systemd/module-setup.sh: only create empty machine-id if non existing
authorHarald Hoyer <harald@redhat.com>
Fri, 22 Jun 2012 13:19:32 +0000 (15:19 +0200)
committerHarald Hoyer <harald@redhat.com>
Fri, 29 Jun 2012 10:41:25 +0000 (12:41 +0200)
modules.d/98systemd/module-setup.sh

index a6e2365..206f341 100755 (executable)
@@ -101,7 +101,9 @@ install() {
             /etc/vconsole.conf \
             /etc/locale.conf
     else
-        > "$initdir/etc/machine-id"
+        if ! [[ -e "$initdir/etc/machine-id" ]]; then
+            > "$initdir/etc/machine-id"
+        fi
     fi
 
     ln -fs $systemdutildir/systemd "$initdir/init"