From: Michael Prokop Date: Thu, 10 Jan 2013 12:46:11 +0000 (+0100) Subject: Further adaptions regarding new /lib/live directory X-Git-Tag: v0.10.1~1 X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=ec19b33413c8a79c9d65be0f2f4bb62436c690b9 Further adaptions regarding new /lib/live directory Also adjust save-config, grml-autoconfig and docs/tests for the new directory. --- diff --git a/bin/save-config b/bin/save-config index f7ef85d..9a7af99 100755 --- a/bin/save-config +++ b/bin/save-config @@ -18,12 +18,14 @@ LC_ALL=C [[ $UID != 0 ]] && runas='sudo' # important for /etc - if [ -d /live/overlay ] ; then + if [ -d /lib/live/mount/overlay ] ; then # since around December 2012 + CHANGE_DIR='/lib/live/mount/overlay' + if [ -d /live/overlay ] ; then # until around December 2012 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 + echo "Error: no overlay directories found (like /lib/live/mount/overlay or /live/overlay)." >&2 bailout; exit 1 fi diff --git a/doc/grml-autoconfig.1.txt b/doc/grml-autoconfig.1.txt index a701828..709950c 100644 --- a/doc/grml-autoconfig.1.txt +++ b/doc/grml-autoconfig.1.txt @@ -53,7 +53,7 @@ Permanently adjust boot parameters As you probably know you can adjust boot parameters on the bootprompt. You want to set some boot parameters permanently? That's possible via adding a directory named 'bootparams' to the Grml ISO which has to be located at the root-directory -/bootparams/ (note: the directory is known as /live/image/bootparams/ on a +/bootparams/ (note: the directory is known as /lib/live/mount/medium/bootparams/ on a _running_ Grml system then). Place a textfile inside the directory containing the boot parameters which should be appended to default ones (this corresponds to booting without any special parameters). @@ -150,7 +150,7 @@ Now create a directory named debs and place foobar.deb in it: mkdir debs/ && cp foobar.deb debs/ -Notice: This directory will be located in /live/image after burning the second +Notice: This directory will be located in /lib/live/mount/medium after burning the second session. Now create the second session containing this directory: diff --git a/doc/grml-autoconfig.current.txt b/doc/grml-autoconfig.current.txt index 12eec8a..2e36d1f 100644 --- a/doc/grml-autoconfig.current.txt +++ b/doc/grml-autoconfig.current.txt @@ -149,7 +149,7 @@ Permanently adjust boot parameters As you probably know you can adjust boot parameters on the bootprompt. You want to set some boot parameters permanently? That's possible via adding a directory named 'bootparams' to the Grml ISO which has to be located at the root-directory -/bootparams/ (note: the directory is known as /live/image/bootparams/ on a +/bootparams/ (note: the directory is known as /lib/live/mount/medium/bootparams/ on a _running_ Grml system then). Place a textfile inside the directory containing the boot parameters which should be appended to default ones (this corresponds to booting without any special parameters). diff --git a/grml-autoconfig b/grml-autoconfig index 9305cfe..cd584f2 100755 --- a/grml-autoconfig +++ b/grml-autoconfig @@ -59,7 +59,7 @@ checkvalue $CONFIG_DEBUG && config_debug # update /etc/mtab if running in live-initramfs mode: if [ -z "$INSTALLED" -a -e /live/cow ] ; then if ! grep -q rootfs /etc/mtab ; then - for i in rootfs "none /sys sysfs" proc /live/image /live/cow /lib/init/rw /dev/shm /dev/pts ; do + for i in rootfs "none /sys sysfs" proc ${LIVECD_PATH} /live/cow /lib/init/rw /dev/shm /dev/pts ; do grep $i /proc/mounts | grep -v /dev/.static >> /etc/mtab done fi @@ -203,8 +203,7 @@ if [ -n "$BOOTDEBUG" ] ; then # set only if not already set if [ -z "$CMDLINE" ] ; then CMDLINE="$(cat /proc/cmdline)" - [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/*)" - [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/*)" + [ -d ${LIVECD_PATH}/bootparams/ ] && CMDLINE="$CMDLINE $(cat ${LIVECD_PATH}/bootparams/*)" fi einfo "Bootoption debug detected. Printing kernel command line:" echo "$CMDLINE" diff --git a/tests/test_dcsdir.sh b/tests/test_dcsdir.sh index 0f012e8..745813c 100755 --- a/tests/test_dcsdir.sh +++ b/tests/test_dcsdir.sh @@ -5,7 +5,7 @@ test_finddcsdir() { CMDLINE='' INSTALLED='' - EXPECTED_PATH='/live/image' + EXPECTED_PATH='/lib/live/mount/medium' config_finddcsdir &>/dev/null