Merge remote-tracking branch 'origin/github/pr/148'
[grml-live.git] / remaster / grml-live-remaster
index aa5390e..ab8ca18 100755 (executable)
@@ -21,15 +21,15 @@ fi
 
 set -e # exit on any error
 
-if [ -d /live/image/boot/ ] ; then # until Grml versions <=2012.XX
-  LIVE_PATH_MAIN='/live/image'
-  LIVE_PATH_BOOT='/live/image/boot/'
-else # for Grml versions >=2013.XX
+if [ -d /run/live/medium/ ] ; then # since Dec 2018
+  LIVE_PATH_MAIN='/run/live/medium/'
+  LIVE_PATH_BOOT='/run/live/medium/boot/'
+else # until Dec 2018
   LIVE_PATH_MAIN='/lib/live/mount/medium/'
   LIVE_PATH_BOOT='/lib/live/mount/medium/boot/'
 fi
 
-VERSION='0.0.3'
+VERSION='0.0.4'
 GRML_LIVE_EDITOR=${VISUAL:-${EDITOR:-vi}}
 
 # source core functions {{{
@@ -82,7 +82,7 @@ if [ -z "$1" ]; then
 Usage: $0 destination.iso
   destination.iso should point to a path that is on a hard disk,
   you might want to mount some swap partitions or swap files
-  first, because grml-live-remaster will need a lot ot RAM.
+  first, because grml-live-remaster will need a lot of RAM.
 
 Please report bugs and feature requests: http://grml.org/bugs/" >&2
    exit 1
@@ -94,8 +94,8 @@ if [ ! -r /remaster ]; then
   exit 1
 fi
 
-mkdir -p /remaster/chroot /remaster/tmp /remaster/cdrom
-mount -t tmpfs tmpfs /remaster/tmp
+mkdir -p /remaster/chroot /remaster/tmp /remaster/cdrom /remaster/work
+
 echo "#:# edit the following two lines to change the boot message" >/remaster/msg
 echo "#:#" >>/remaster/msg
 if [ -r ${LIVE_PATH_BOOT}/isolinux/boot.msg ] ; then
@@ -107,8 +107,8 @@ if ! grep -q "/remaster/cdrom squashfs" /proc/mounts ;  then
    mount -t squashfs "$SQUASHFS_FILE" /remaster/cdrom -o ro,loop
 fi
 
-if ! grep -q "aufs /remaster/chroot" /proc/mounts ; then
-   mount -t aufs aufs /remaster/chroot -o br:/remaster/tmp=rw:/remaster/cdrom=rr
+if ! grep -q "overlay /remaster/chroot" /proc/mounts ; then
+  mount -t overlay overlay -o lowerdir=/remaster/cdrom,upperdir=/remaster/tmp,workdir=/remaster/work /remaster/chroot
 fi
 
 for i in run dev dev/pts proc root sys tmp; do