X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=bin%2Fsave-config;h=63e41c77cdfe5a6288b64058d49ccbba82ce2fa3;hp=f7ef85dc2818c39cd29101e4496a46e3a9dc9c52;hb=af578f247f401edc1f56039a2528b397c6a467bb;hpb=b429b30939d16d777bf90f89d6f89da4ce1696b4 diff --git a/bin/save-config b/bin/save-config index f7ef85d..63e41c7 100755 --- a/bin/save-config +++ b/bin/save-config @@ -18,19 +18,22 @@ LC_ALL=C [[ $UID != 0 ]] && runas='sudo' # important for /etc - if [ -d /live/overlay ] ; then - CHANGE_DIR='/live/overlay' - elif [ -d /live/image ] ; then # old version - CHANGE_DIR='/live/image' + if [ -d /run/live/overlay/rw ] ; then # since Dec 2018 + CHANGE_DIR='/run/live/overlay/rw' + elif [ -d /lib/live/mount/overlay/rw ] ; then # 2012 until Dec 2018, backwards compatibility + CHANGE_DIR='/lib/live/mount/overlay/rw' else - echo "Error: no overlay directories found (neither /live/overlay nor /live/image)." >&2 + echo "Error: no overlay directories found (like /lib/live/mount/overlay or /live/overlay)." >&2 bailout; exit 1 fi - if [ -d /live/rofs ] ; then - ORIG_DIR="$(find /live/rofs/ -maxdepth 1 -name \*.squashfs | head -1)" - else # old version - ORIG_DIR="/GRML" + if [ -d /run/live/rootfs ] ; then + ORIG_DIR="$(find /run/live/rootfs/ -maxdepth 1 -name \*.squashfs | head -1)" + elif [ -d /lib/live/mount/rootfs ] ; then + ORIG_DIR="$(find /lib/live/mount/rootfs/ -maxdepth 1 -name \*.squashfs | head -1)" + else + echo "Error: no rootfs directories found in '/run/live/rootfs' or '/lib/live/mount/rootfs'." >&2 + bailout; exit 1 fi check4progs mutt &>/dev/null || echo "Warning, mutt not available for mail handling.">&2