+ [[ $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'
+ else
+ echo "Error: no overlay directories found (neither /live/overlay nor /live/image)." >&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"
+ fi