summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f816094)
Debian's live-boot changed the path from /live/image to
/lib/live/mount/medium, so adopt our code to support those
new versions without breaking older ISOs.
# old linuxrc version:
[ -d /cdrom ] && export LIVECD_PATH=/cdrom
# old linuxrc version:
[ -d /cdrom ] && export LIVECD_PATH=/cdrom
+# initramfs layout until around December 2012:
[ -d /live/image ] && export LIVECD_PATH=/live/image
[ -d /live/image ] && export LIVECD_PATH=/live/image
+# initramfs layout since around December 2012:
+[ -d /lib/live/mount/medium ] && export LIVECD_PATH=/lib/live/mount/medium
# Ignore these signals in non-interactive mode: INT, TERM, SEGV
[ -z "$PS1" ] && trap "" 2 3 11
# Ignore these signals in non-interactive mode: INT, TERM, SEGV
[ -z "$PS1" ] && trap "" 2 3 11
# if CMDLINE was set from the outside, we're debugging.
# otherwise, take CMDLINE from Kernel and config files.
CMDLINE="$(cat /proc/cmdline)"
# if CMDLINE was set from the outside, we're debugging.
# otherwise, take CMDLINE from Kernel and config files.
CMDLINE="$(cat /proc/cmdline)"
- [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/* | tr '\n' ' ')"
- [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/* | tr '\n' ' ')"
+ [ -d ${LIVECD_PATH}/bootparams/ ] && CMDLINE="$CMDLINE $(cat ${LIVECD_PATH}/bootparams/* | tr '\n' ' ')"
modprobe 9p 2>/dev/null || true
if grep -q 9p /proc/filesystems ; then
TAG="grml-parameters"
modprobe 9p 2>/dev/null || true
if grep -q 9p /proc/filesystems ; then
TAG="grml-parameters"
GRMLCFG="$(getbootparam 'autoconfig' 2>>$DEBUG)"
[ -n "$GRMLCFG" ] || GRMLCFG="GRMLCFG"
if checkbootparam 'noautoconfig' || checkbootparam 'forensic' ; then
GRMLCFG="$(getbootparam 'autoconfig' 2>>$DEBUG)"
[ -n "$GRMLCFG" ] || GRMLCFG="GRMLCFG"
if checkbootparam 'noautoconfig' || checkbootparam 'forensic' ; then
- DCSDIR="/live/image" # set default so it works for "scripts" boot option as expected
+ DCSDIR="${LIVECD_PATH}" # set default so it works for "scripts" boot option as expected
ewarn "Skipping running automount of device(s) labeled $GRMLCFG as requested." ; eend 0
else
if [ -z "$INSTALLED" ] ; then
ewarn "Skipping running automount of device(s) labeled $GRMLCFG as requested." ; eend 0
else
if [ -z "$INSTALLED" ] ; then
# if not specified/present then assume default:
if [ -z "$DCSDEVICE" ]; then
# if not specified/present then assume default:
if [ -z "$DCSDEVICE" ]; then
+ DCSDIR="${LIVECD_PATH}"
else
eindent
einfo "debs, config, scripts are read from $DCSDEVICE." ; eend 0
else
eindent
einfo "debs, config, scripts are read from $DCSDEVICE." ; eend 0
-if [ -n "$DCSDIR" -a "$DCSDIR" != "/live/image" ] ; then
+if [ -n "$DCSDIR" -a "$DCSDIR" != "${LIVECD_PATH}" ] ; then
einfo "Debs, config, scripts (if present) will be read from $DCSDIR." ; eend 0
elif checkbootparam 'debs' || checkbootparam 'config' || checkbootparam 'scripts'; then
einfo "Debs, config, scripts will be read from the live image directly." ; eend 0
einfo "Debs, config, scripts (if present) will be read from $DCSDIR." ; eend 0
elif checkbootparam 'debs' || checkbootparam 'config' || checkbootparam 'scripts'; then
einfo "Debs, config, scripts will be read from the live image directly." ; eend 0
if mount -o rw "$TARGET" "$MOUNTDIR" ; then
einfo "Copyring live system to $TARGET - this might take a while"
if mount -o rw "$TARGET" "$MOUNTDIR" ; then
einfo "Copyring live system to $TARGET - this might take a while"
- rsync -a --progress /live/image/live $MOUNTDIR
+ rsync -a --progress ${LIVECD_PATH}/live $MOUNTDIR
sync
umount "$MOUNTDIR"
eend $?
sync
umount "$MOUNTDIR"
eend $?