X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=bin%2Fsave-config;h=63e41c77cdfe5a6288b64058d49ccbba82ce2fa3;hp=fea435acb61596c211abfa5b317ba152e023aeb9;hb=b451f8e63d2d6b8bc254f253d1e5a9ff136c8083;hpb=5ee88545febd109443645f5a4eb087dd5ae2c5f8 diff --git a/bin/save-config b/bin/save-config index fea435a..63e41c7 100755 --- a/bin/save-config +++ b/bin/save-config @@ -18,21 +18,22 @@ LC_ALL=C [[ $UID != 0 ]] && runas='sudo' # important for /etc - if [ -d /lib/live/mount/overlay ] ; then # since around December 2012 - CHANGE_DIR='/lib/live/mount/overlay' - elif [ -d /live/overlay ] ; then # until around December 2012 - 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 (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