X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FDEBIAN%2F40-misc;h=714be559ca00935587199405a90e7d593f127605;hb=7ade5e2c6113530c5f99cfc95880897fcb479f39;hp=78773f35458e6f79ed797d1522600efdece768fb;hpb=2773c14668a490a1254a63541e1ef9fd3377104b;p=automated-distro-installer diff --git a/fai/config/scripts/DEBIAN/40-misc b/fai/config/scripts/DEBIAN/40-misc index 78773f3..714be55 100755 --- a/fai/config/scripts/DEBIAN/40-misc +++ b/fai/config/scripts/DEBIAN/40-misc @@ -33,7 +33,7 @@ if [ ! -f $target/etc/machine-id ]; then > $target/etc/machine-id fi # recreate machine-id if the file is empty -if [ X"$(stat -c '%s' $target/etc/machine-id 2>/dev/null)" = X0 -a -f /bin/systemd-machine-id-setup ]; then +if [ X"$(stat -c '%s' $target/etc/machine-id 2>/dev/null)" = X0 -a -f $target/bin/systemd-machine-id-setup ]; then $ROOTCMD systemd-machine-id-setup fi @@ -41,13 +41,11 @@ ln -fs /proc/mounts $target/etc/mtab rm -f $target/etc/dpkg/dpkg.cfg.d/fai $target/etc/dpkg/dpkg.cfg.d/unsafe-io -if [ $FAI_ACTION = "install" -o $FAI_ACTION = "dirinstall" ] ; then - [ -f /etc/fai/fai.conf ] && cp /etc/fai/fai.conf $target/etc/fai/fai.conf +if [ -d /etc/fai ]; then + if ! fcopy -Mv /etc/fai/fai.conf; then + ainsl -a /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC" + fi fi - -ainsl -a /etc/fai/fai.conf "FAI_CONFIG_SRC=$FAI_CONFIG_SRC" - -fcopy -Miv /etc/fai/fai.conf fcopy -iv /etc/rc.local exit $error