- check4progs mutt || echo "Warning, mutt not available for mail handling.">&2
- check4progs findchanged tar || { echo "Sorry, can't continue. Exiting.">&2 ; exit 1 }
+ 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 /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
+ check4progs tar || { echo "Sorry, can't continue. Exiting.">&2 ; bailout ; exit 1 }