@DPATCH@
---- a/hooks/live
-+++ b/hooks/live
-@@ -40,6 +40,12 @@
- done
- fi
+--- a/backends/initramfs-tools/live.hook
++++ b/backends/initramfs-tools/live.hook
+@@ -16,6 +16,12 @@ do
+ fi
+ done
+# Grml version information:
+if [ -r /etc/grml_version ]
+ cp /etc/grml_version "${DESTDIR}"/etc
+fi
+
- # Handling live-boot
-
- if [ ! -e /usr/share/live-boot ]
+ # Checking live-boot
+ if [ ! -e /lib/live/boot ]
+ then
@DPATCH@
---- a/scripts/live-functions
-+++ b/scripts/live-functions
-@@ -88,14 +88,20 @@
+--- a/scripts/boot/9990-initramfs-tools.sh
++++ b/scripts/boot/9990-initramfs-tools.sh
+@@ -44,14 +44,20 @@
printf " ${DEB_1}\n"
printf " ${DEB_2} \033[1;37mBOOT FAILED!\033[0m\n"
printf " ${DEB_3}\n"
## DP: Pseudo-brand as grml
@DPATCH@
---- a/scripts/live
-+++ b/scripts/live
-@@ -11,7 +11,7 @@
+--- a/scripts/boot/9990-aaa-fixme.sh
++++ b/scripts/boot/9990-aaa-fixme.sh
+@@ -9,7 +9,7 @@
alt_mountpoint="/media"
LIVE_MEDIA_PATH="live"
hostname of the booted system according to the DNS information.
This patch takes care of the netboot case.
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -202,6 +202,11 @@
- export NOACCESSIBILITY
+--- a/scripts/boot/9990-cmdline-old
++++ b/scripts/boot/9990-cmdline-old
+@@ -140,6 +140,11 @@ Cmdline_old ()
+ export NFS_COW
;;
+ nodhcphostname)
+ export NODHCPHOSTNAME
+ ;;
+
- nofastboot)
- NOFASTBOOT="Yes"
- export NOFASTBOOT
+ nofstab)
+ NOFSTAB="true"
+ export NOFSTAB
## DP: * no bootid.txt + ignore_bootid=... => boots
@DPATCH@
---- a/scripts/live
-+++ b/scripts/live
+--- a/scripts/boot/9990-misc-helpers.sh
++++ b/scripts/boot/9990-misc-helpers.sh
@@ -52,6 +52,42 @@
return 1
}
fi
done
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -45,6 +45,11 @@
- export ACCESS
+--- a/scripts/boot/9990-cmdline-old
++++ b/scripts/boot/9990-cmdline-old
+@@ -18,6 +18,11 @@
+ BOOTIF="${x#BOOTIF=}"
;;
+ bootid=*)
-+ BOOTID="${ARGUMENT#bootid=}"
++ BOOTID="${_PARAMETER#bootid=}"
+ export BOOTID
+ ;;
+
- console=*)
- DEFCONSOLE="${ARGUMENT#*=}"
- export DEFCONSOLE
-@@ -126,6 +131,11 @@
+ dhcp)
+ # Force dhcp even while netbooting
+ # Use for debugging in case somebody works on fixing dhclient
+@@ -79,6 +84,11 @@
export FROMISO
;;
+ ;;
+
ignore_uuid)
- IGNORE_UUID="Yes"
+ IGNORE_UUID="true"
export IGNORE_UUID
## DP: Always display failure and warning messages.
@DPATCH@
-Index: b/scripts/live-functions
+Index: live-boot-grml/scripts/boot/9990-initramfs-tools.sh
===================================================================
---- a/scripts/live-functions 2011-07-24 22:07:56.000000000 +0200
-+++ b/scripts/live-functions 2011-07-24 22:08:04.000000000 +0200
+--- live-boot-grml.orig/scripts/boot/9990-initramfs-tools.sh 2012-11-28 08:10:50.815614786 +0100
++++ live-boot-grml/scripts/boot/9990-initramfs-tools.sh 2012-11-28 08:25:12.864563943 +0100
@@ -2,6 +2,17 @@
- . /scripts/functions
- . /live.vars
+
+ #set -e
+# we definitely want this stuff visible
+log_failure_msg()
diff a/scripts/live-bottom/23networking_grml b/scripts/live-bottom/23networking_grml
--- /dev/null
-+++ b/scripts/live-bottom/23networking_grml
-@@ -0,0 +1,107 @@
++++ b/scripts/boot/9990-grml-networking.sh
+@@ -0,0 +1,93 @@
+#!/bin/sh
+
+#set -e
+
-+# initramfs-tools header
-+
-+PREREQ=""
-+
-+prereqs()
-+{
-+ echo "${PREREQ}"
-+}
-+
-+case "${1}" in
-+ prereqs)
-+ prereqs
-+ exit 0
-+ ;;
-+esac
-+
-+. /scripts/live-functions
++Grml_Networking () {
+
+if [ -n "${NONETWORKING}" ]; then
+ exit 0
+
+ echo>> $IFFILE
+done
++
++}
+diff --git a/scripts/boot/9990-main.sh b/scripts/boot/9990-main.sh
+index ef41fb0..2af5eb6 100755
+--- a/scripts/boot/9990-main.sh
++++ b/scripts/boot/9990-main.sh
+@@ -194,6 +194,8 @@ Main ()
+
+ Swap
+
++ Grml_Networking
++
+ case "${UNIONFS}" in
+ unionfs-fuse)
+ umount "${rootmnt}/dev"
@DPATCH@
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -75,6 +75,8 @@
-
+--- a/scripts/boot/9990-cmdline-old
++++ b/scripts/boot/9990-cmdline-old
+@@ -28,6 +28,8 @@
nodhcp)
- unset DHCP
+ DHCP=""
+ export DHCP
+ NODHCP="Yes"
+ export NODHCP
;;
@DPATCH@
index d79beed..1b6926e 100755
---- a/scripts/live
-+++ b/scripts/live
+--- a/scripts/boot/9990-toram-todisk.sh
++++ b/scripts/boot/9990-toram-todisk.sh
@@ -202,7 +202,7 @@
if [ -z "${MODULETORAM}" ]
## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4
@DPATCH@
---- a/scripts/live
-+++ b/scripts/live
-@@ -429,7 +429,7 @@
+Index: live-boot-grml/scripts/boot/9990-networking.sh
+===================================================================
+--- live-boot-grml.orig/scripts/boot/9990-networking.sh 2012-11-28 17:23:14.954502427 +0100
++++ live-boot-grml/scripts/boot/9990-networking.sh 2012-11-28 17:46:56.190917365 +0100
+@@ -153,7 +153,7 @@
echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
do
if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
then
---- a/scripts/live-bottom/23networking_grml
-+++ b/scripts/live-bottom/23networking_grml
-@@ -44,7 +44,12 @@
+Index: live-boot-grml/scripts/boot/9990-grml-networking.sh
+===================================================================
+--- live-boot-grml.orig/scripts/boot/9990-grml-networking.sh 2012-11-28 17:46:38.000000000 +0100
++++ live-boot-grml/scripts/boot/9990-grml-networking.sh 2012-11-28 17:46:56.190917365 +0100
+@@ -28,7 +28,12 @@
# prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
IFFILE="/root/etc/network/interfaces"
# config for loopback networking
cat > $IFFILE << EOF
-@@ -105,3 +110,17 @@
-
+@@ -90,4 +95,18 @@
echo>> $IFFILE
done
-+
+
+# dns bootoption
+if [ -n "$DNSSERVER1" ]
+then
+ echo "nameserver $i" >> $RESOLVCONF
+ done
+fi
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -59,6 +59,19 @@
++
+ }
+--- live-boot-grml.orig/scripts/boot/9990-cmdline-old 2012-11-28 17:46:38.000000000 +0100
++++ live-boot-grml/scripts/boot/9990-cmdline-old 2012-11-28 17:46:56.190917365 +0100
+@@ -18,6 +18,19 @@
BOOTIF="${x#BOOTIF=}"
;;
+ dns=*)
-+ DNSSERVER="${ARGUMENT#*=}"
++ DNSSERVER="${_PARAMETER#*=}"
+ if echo "${DNSSERVER}" | grep -q , ; then
+ DNSSERVER1="${DNSSERVER%,*}"
+ DNSSERVER2="${DNSSERVER#*,}"
+ unset DNSSERVER
+ ;;
+
- debug)
- DEBUG="Yes"
- export DEBUG
+ bootid=*)
+ BOOTID="${_PARAMETER#bootid=}"
+ export BOOTID
@DPATCH@
---- a/scripts/live
-+++ b/scripts/live
-@@ -294,6 +294,24 @@
- return 0
- }
+Index: live-boot-grml/scripts/boot/9990-networking.sh
+===================================================================
+--- live-boot-grml.orig/scripts/boot/9990-networking.sh 2012-12-03 07:59:14.790837135 +0100
++++ live-boot-grml/scripts/boot/9990-networking.sh 2012-12-03 07:59:19.665258773 +0100
+@@ -2,6 +2,24 @@
+
+ #set -e
+get_ipconfig_para()
+{
do_netsetup ()
{
modprobe -q af_packet # For DHCP
-@@ -304,9 +322,19 @@
+@@ -12,8 +30,19 @@
[ -n "$ETHDEV_TIMEOUT" ] || ETHDEV_TIMEOUT=15
echo "Using timeout of $ETHDEV_TIMEOUT seconds for network configuration."
-- if [ -z "${NETBOOT}" ] && [ -z "${FETCH}" ] && \
-- [ -z "${HTTPFS}" ] && [ -z "${FTPFS}" ]
+- if [ -z "${NETBOOT}" ] && [ -z "${FETCH}" ] && [ -z "${HTTPFS}" ] && [ -z "${FTPFS}" ]
- then
+ # Our modus operandi for getting a working network setup is this:
+ # * If ip=* is set, pass that to ipconfig and be done
+ echo "Net: Turning on all device links..."
+ for device in ${ALLDEVICES}; do
+ ipconfig -c none -d $device -t 1 2>/dev/null >/dev/null
-+ done
-
++ done
+ # support for Syslinux IPAPPEND parameter
+ # it sets the BOOTIF variable on the kernel parameter
- # support for Syslinux IPAPPEND parameter
-@@ -349,7 +377,7 @@
+@@ -54,7 +83,7 @@
- if [ "$bootif_mac" = "$current_mac" ]
- then
-- DEVICE=${device##*/}
-+ ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice
- break
+ if [ "$bootif_mac" = "$current_mac" ]
+ then
+- DEVICE=${device##*/}
++ ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice
+ break
+ fi
fi
- fi
-@@ -361,12 +389,7 @@
- # for *every* present network device (except for loopback of course)
- if [ -z "$ETHDEVICE" ] ; then
- echo "If you want to boot from a specific device use bootoption ethdevice=..."
-- for device in /sys/class/net/*; do
-- dev=${device##*/} ;
-- if [ "$dev" != "lo" ] ; then
-- ETHDEVICE="$ETHDEVICE $dev"
-- fi
-- done
-+ ETHDEVICE="$ALLDEVICES"
- fi
-
- # split args of ethdevice=eth0,eth1 into "eth0 eth1"
-@@ -374,43 +397,34 @@
- devlist="$devlist $device"
- done
-
-- # this is tricky (and ugly) because ipconfig sometimes just hangs/runs into
-- # an endless loop; iff execution fails give it two further tries, that's
-- # why we use '$devlist $devlist $devlist' for the other for loop
-- for dev in $devlist $devlist $devlist ; do
-- echo "Executing ipconfig -t $ETHDEV_TIMEOUT $dev"
-- ipconfig -t "$ETHDEV_TIMEOUT" $dev | tee -a /netboot.config &
-- jobid=$!
-- sleep "$ETHDEV_TIMEOUT" ; sleep 1
-- if [ -r /proc/"$jobid"/status ] ; then
-- echo "Killing job $jobid for device $dev as ipconfig ran into recursion..."
-- kill -9 $jobid
-+ for dev in $devlist ; do
-+ param="$(get_ipconfig_para $dev)"
-+ if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
-+ echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
-+ continue
+@@ -67,14 +96,7 @@
+ if [ -z "$ETHDEVICE" ]
+ then
+ echo "If you want to boot from a specific device use bootoption ethdevice=..."
+- for device in /sys/class/net/*
+- do
+- dev=${device##*/}
+- if [ "$dev" != "lo" ]
+- then
+- ETHDEVICE="$ETHDEVICE $dev"
+- fi
+- done
++ ETHDEVICE="$ALLDEVICES"
fi
-+ echo "Executing ipconfig -t $ETHDEV_TIMEOUT $param"
-+ ipconfig -t "$ETHDEV_TIMEOUT" "$param" | tee -a /netboot.config
- # if configuration of device worked we should have an assigned
- # IP address, iff so let's use the according as $DEVICE for later usage
- # simple and primitive approach which seems to work fine
-- if ifconfig $dev | grep -q 'inet.*addr:' ; then
-- export DEVICE="$dev"
-- break
-+ IPV4ADDR="0.0.0.0"
-+ if [ -e "/run/net-${device}.conf" ]; then
-+ . /run/net-${device}.conf
-+ fi
-+ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
-+ export DEVICE="$dev $DEVICE"
-+ # break # exit loop as we just use the irst
- fi
-- done
+ # split args of ethdevice=eth0,eth1 into "eth0 eth1"
+@@ -83,46 +105,28 @@
+ devlist="$devlist $device"
+ done
+- # this is tricky (and ugly) because ipconfig sometimes just hangs/runs into
+- # an endless loop; if execution fails give it two further tries, that's
+- # why we use '$devlist $devlist $devlist' for the other for loop
+- for dev in $devlist $devlist $devlist
+- do
+- echo "Executing ipconfig -t $ETHDEV_TIMEOUT $dev"
+- ipconfig -t "$ETHDEV_TIMEOUT" $dev | tee -a /netboot.config &
+- jobid=$!
+- sleep "$ETHDEV_TIMEOUT" ; sleep 1
+- if [ -r /proc/"$jobid"/status ]
+- then
+- echo "Killing job $jobid for device $dev as ipconfig ran into recursion..."
+- kill -9 $jobid
++ for dev in $devlist ; do
++ param="$(get_ipconfig_para $dev)"
++ if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
++ echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
++ continue
+ fi
++ echo "Executing ipconfig -t $ETHDEV_TIMEOUT $param"
++ ipconfig -t "$ETHDEV_TIMEOUT" "$param" | tee -a /netboot.config
+
+ # if configuration of device worked we should have an assigned
+ # IP address, if so let's use the device as $DEVICE for later usage.
+ # simple and primitive approach which seems to work fine
+- if ifconfig $dev | grep -q 'inet.*addr:'
+- then
+- export DEVICE="$dev"
+- break
++ IPV4ADDR="0.0.0.0"
++ if [ -e "/run/net-${device}.conf" ]; then
++ . /run/net-${device}.conf
++ fi
++ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
++ export DEVICE="$dev $DEVICE"
++ # break # exit loop as we just use the irst
+ fi
+ done
- else
- for interface in ${DEVICE}; do
- ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config
+-
+- # squeeze
- [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
+-
+- # wheezy
+- [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf
+-
- if [ "$IPV4ADDR" != "0.0.0.0" ]
- then
- break
- fi
- done
- fi
-+ done
-+ unset devlist
-
- for interface in ${DEVICE}; do
- # source relevant ipconfig output
- OLDHOSTNAME=${HOSTNAME}
-- [ -e /tmp/net-${interface}.conf ] && . /tmp/net-${interface}.conf
-+ [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf
- [ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
- export HOSTNAME
++ unset devlist
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
-@@ -93,9 +93,8 @@
+ for interface in ${DEVICE}
+ do
+Index: live-boot-grml/scripts/boot/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/scripts/boot/9990-cmdline-old 2012-12-03 07:59:14.794839124 +0100
++++ live-boot-grml/scripts/boot/9990-cmdline-old 2012-12-03 07:59:19.665258773 +0100
+@@ -51,9 +51,8 @@
;;
ethdevice=*)
-- DEVICE="${ARGUMENT#ethdevice=}"
+- DEVICE="${_PARAMETER#ethdevice=}"
- ETHDEVICE="${DEVICE}"
- export DEVICE ETHDEVICE
-+ ETHDEVICE="${ARGUMENT#ethdevice=}"
++ ETHDEVICE="${_PARAMETER#ethdevice=}"
+ export ETHDEVICE
;;
ethdevice-timeout=*)
-@@ -162,13 +161,9 @@
+@@ -110,13 +109,9 @@
;;
ip=*)
-- STATICIP="${ARGUMENT#ip=}"
+- STATICIP="${_PARAMETER#ip=}"
-
- if [ -z "${STATICIP}" ]
- then
-
+ # copy complete ip=args into staticip, and
+ # keep multiple uses.
-+ STATICIP="${STATICIP} ${ARGUMENT}"
++ STATICIP="${STATICIP} ${_PARAMETER}"
export STATICIP
;;
Thanks to Ulrich Dangel for discovering this. [Closes: issue848]
-Index: live-boot-grml/hooks/live
-===================================================================
---- live-boot-grml.orig/hooks/live 2011-12-06 22:10:17.000000000 +0100
-+++ live-boot-grml/hooks/live 2011-12-06 22:10:47.000000000 +0100
-@@ -266,17 +266,14 @@
- manual_add_modules crc32c
- fi
+--- a/backends/initramfs-tools/live.hook
++++ b/backends/initramfs-tools/live.hook
+@@ -217,24 +217,20 @@ fi
--if [ "${LIVE_DNS}" = "true" ]
--then
-- [ "${QUIET}" ] || echo -n " "dns
-- #copy_exec /lib/libnss_files.so.* /lib # /etc/hosts and /etc/passwd
-- copy_exec /lib/libnss_dns.so.* /lib # DNS server
-- #copy_exec /lib/libnss_compat.so.* /lib # /etc/passwd
-+# DNS for initramfs
-+#copy_exec /lib/libnss_files.so.* /lib # /etc/hosts and /etc/passwd
-+copy_exec /lib/libnss_dns.so.* /lib # DNS server
-+#copy_exec /lib/libnss_compat.so.* /lib # /etc/passwd
+ # Some experimental stuff
-- # Configuration file - may be needed if /etc/hosts is used.
-- #mkdir -p $DESTDIR/etc
-- #cp -p /etc/nsswitch.conf $DESTDIR/etc
--fi
-+# Configuration file - may be needed if /etc/hosts is used.
-+#mkdir -p $DESTDIR/etc
-+#cp -p /etc/nsswitch.conf $DESTDIR/etc
+-case "${LIVE_DNS}" in
+- true)
+- [ "${QUIET}" ] || echo -n " dns"
++[ "${QUIET}" ] || echo -n " dns"
- if [ "${LIVE_UNIONMOUNT}" = "true" ]
- then
+- # /lib/libnss_dns.so.*:a DNS
+- # /lib/libnss_files.so.*: /etc/hosts and /etc/passwd
+- # /lib/libnss_compat.so.*: /etc/passwd
++# /lib/libnss_dns.so.*:a DNS
++# /lib/libnss_files.so.*: /etc/hosts and /etc/passwd
++# /lib/libnss_compat.so.*: /etc/passwd
+
+- for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
+- do
+- copy_exec "${_SHLIB}"
+- done
++for _SHLIB in $(find /lib -name 'libnss_dns.so.*')
++do
++ copy_exec "${_SHLIB}"
++done
+
+- # might be needed if /etc/hosts is used
+- #mkdir -p "${DESTDIR}/etc"
+- #cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
+- ;;
+-esac
++# might be needed if /etc/hosts is used
++#mkdir -p "${DESTDIR}/etc"
++#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
+
+ case "${LIVE_UNIONMOUNT}" in
+ true)
+++ /dev/null
-commit 6666658535b255cb71d48ddeb415aeb3023e1251
-Author: Michael Prokop <mika@grml.org>
-Date: Tue Jun 7 10:15:52 2011 +0200
-
- Do not fail in multiarch environment when installing libnss_dns.so.
-
- Updating initramfs fails with:
-
- | live-boot: core filesystems devices utils:memdisk udev wget blockdevE: /usr/share/initramfs-tools/hooks/live failed with return 1.
-
- with multiarch libc because the filename is no longer necessarily
- /lib/libnss_dns.so.* but could also be e.g.
- /lib/x86_64-linux-gnu/libnss_dns.so.*.
-
-Index: live-boot-grml/hooks/live
-===================================================================
---- live-boot-grml.orig/hooks/live 2011-12-06 22:10:47.000000000 +0100
-+++ live-boot-grml/hooks/live 2011-12-06 22:10:55.000000000 +0100
-@@ -268,7 +268,16 @@
-
- # DNS for initramfs
- #copy_exec /lib/libnss_files.so.* /lib # /etc/hosts and /etc/passwd
--copy_exec /lib/libnss_dns.so.* /lib # DNS server
-+# DNS server:
-+if ls /lib/libnss_dns.so.* >/dev/null 2>&1 ; then # non-multiarch libc
-+ copy_exec /lib/libnss_dns.so.* /lib
-+elif ls /lib/*/libnss_dns.so.* >/dev/null 2>&1 ; then # multiarch libc
-+ for libnss in /lib/*/libnss_dns.so.* ; do
-+ copy_exec "$libnss"
-+ done
-+else
-+ echo "Warning: libnss_dns.so.* not found. DNS in initramfs not functional."
-+fi
- #copy_exec /lib/libnss_compat.so.* /lib # /etc/passwd
-
- # Configuration file - may be needed if /etc/hosts is used.
--- a/Makefile
+++ b/Makefile
-@@ -52,11 +52,11 @@
- cp -r hooks scripts $(DESTDIR)/usr/share/initramfs-tools
+@@ -52,8 +52,8 @@
+ cp backends/initramfs-tools/live.script $(DESTDIR)/usr/share/initramfs-tools/scripts/live
# Installing docs
- mkdir -p $(DESTDIR)/usr/share/doc/live-boot
+ mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml
+ cp -r COPYING $(DESTDIR)/usr/share/doc/live-boot-grml
-- mkdir -p $(DESTDIR)/usr/share/doc/live-boot/examples
-- cp -r etc/* $(DESTDIR)/usr/share/doc/live-boot/examples
-+ mkdir -p $(DESTDIR)/usr/share/doc/live-boot-grml/examples
-+ cp -r etc/* $(DESTDIR)/usr/share/doc/live-boot-grml/examples
- # (FIXME)
-
# Installing manpages
-@@ -94,7 +94,7 @@
+ for MANPAGE in manpages/en/*; \
+@@ -86,7 +86,7 @@
rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
# Uninstalling docs
Index: live-boot-grml/hooks/kms
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ live-boot-grml/hooks/kms 2011-12-06 22:09:55.000000000 +0100
++++ live-boot-grml/backends/initramfs-tools/kms.hook 2011-12-06 22:09:55.000000000 +0100
@@ -0,0 +1,25 @@
+#!/bin/sh
+# hook for adding kms modules
phram doesn't work on first modprobe, when loading once again it seems
to work. So let's try it this way.
---- a/scripts/live
-+++ b/scripts/live
+--- a/scripts/boot/9990-main.sh
++++ b/scripts/boot/9990-main.sh
@@ -1576,6 +1576,7 @@
then
# We found a memdisk, set up phram
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
+--- a/scripts/boot/9990-misc-helpers.sh
++++ b/scripts/boot/9990-misc-helpers.sh
@@ -507,6 +507,12 @@
return 1
fi
+++ /dev/null
-Purpose: make sure the ISO gets unmounted correctly when booted via findiso/toram
-
---- a/scripts/live
-+++ b/scripts/live
-@@ -1686,7 +1686,7 @@
- then
- losetup -d /dev/loop0
-
-- if is_mountpoint /live/findiso
-+ if is_mountpoint /root/live/findiso
- then
- umount /root/live/findiso
- rmdir --ignore-fail-on-non-empty /root/live/findiso \
---- a/scripts/live
-+++ b/scripts/live
-@@ -399,7 +399,7 @@
-
- for dev in $devlist ; do
- param="$(get_ipconfig_para $dev)"
-- if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
-+ if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] && [ "$DHCP" != "Force" ] ; then
- echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
- continue
- fi
---- a/scripts/live-bottom/23networking_grml
-+++ b/scripts/live-bottom/23networking_grml
+--- a/scripts/boot/9990-grml-networking.sh
++++ b/scripts/boot/9990-grml-networking.sh
@@ -75,6 +75,14 @@
method="manual"
fi
+ # set, then dhcp should win over it as we default to dhcp and if
+ # nodhcp is used as default boot option but "dhcp" is added then it
+ # would be confusing to not get a working network setup
-+ if [ "$DHCP" = "Force" ] ; then
++ if [ "$DHCP" = "true" ] ; then
+ method="dhcp"
+ fi
+
* the mount_persistence_media () function must return the mount point of
the partition to the caller, even if it was already mounted
(${backing} = ${old_backing})
- * Fix the appropriate check that erroneously prevented the use of the
- (unquoted) dot
diff --git a/scripts/live-helpers b/scripts/live-helpers
index b90637a..7d5c675 100644
---- a/scripts/live-helpers
-+++ b/scripts/live-helpers
+--- a/scripts/boot/9990-misc-helpers.sh
++++ b/scripts/boot/9990-misc-helpers.sh
@@ -778,6 +778,7 @@ mount_persistence_media ()
return 1
fi
return 0
}
-@@ -1334,7 +1335,7 @@ get_custom_mounts ()
- local source="${dir}"
- if [ -n "${opt_source}" ]
- then
-- if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${source}" != "." ]
-+ if echo ${opt_source} | grep -q -e "^/" -e "^\(.*/\)\?\.\.\?\(/.*\)\?$" && [ "${opt_source}" != "." ]
- then
- log_warning_msg "Skipping unsafe custom mount with option source=${opt_source}: must be either \".\" (the media root) or a relative path w.r.t. the media root that contains neither comas, nor the special \".\" and \"..\" path components"
- continue
+++ /dev/null
-Description: readonly: do not check for "forensic" boot option
-
-Author: Michael Prokop <mika@grml.org>
-
-We use the "readonly" boot option in the forensic boot menu entry,
-so nothing will change from user's PoV.
-
-The "forensic" string might match in a different context though
-and the "readonly" boot option was removed by intention to not
-block write access to the devices.
-
---- live-boot-3.0~a27.orig/scripts/live-premount/readonly
-+++ live-boot-3.0~a27/scripts/live-premount/readonly
-@@ -22,7 +22,7 @@ esac
-
- # make sure all harddisk devices are read-only
- # this is important for forensic investigations
--if grep -qe forensic -qe readonly /proc/cmdline
-+if grep -qe readonly /proc/cmdline
- then
- for device in /dev/hd* /dev/sd* /dev/vd*
- do
---- a/scripts/live-premount/readonly
-+++ b/scripts/live-premount/readonly
-@@ -32,4 +32,21 @@
- blockdev --setro $device && printf "done [ execute \"blockdev --setrw %-9s\" to unlock]\n" $device >/dev/console || printf "failed\n" >/dev/console
- fi
+--- a/scripts/boot/0120-read-only
++++ b/scripts/boot/0120-read-only
+@@ -53,4 +53,20 @@
+ ;;
+ esac
done
+
+ if grep -qe persistence /proc/cmdline
-+ then
++ then
+ printf " * Persistence mode enabled, searching for persistency related devices to unlock\n" >/dev/console
+
+ for label in custom-ov home-rw home-sn live-rw live-sn
+ if blkid -t LABEL="$label" | grep -q '.'
+ then
+ device=$(blkid -t LABEL="$label" | awk -F: '{print $1}')
-+ printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console
++ printf " - Setting device %-9s with label '%s' to write mode for persistence mode: " "$device" "$label" >/dev/console
+ blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console
+ fi
-+
+ done
+ fi
+
- fi
+ }
26_support_dns_bootoption.patch
27_support_static_ip.patch
29_support_dns_in_initramfs.patch
-30_support_multiarch_dns.patch
31_package_rename.patch
32_add_kms.patch
33_retry_phram.patch
34_ignore_unknown_filesystems.patch
-35_fix_findiso_umount.patch
36_support_dhcp_bootoption.patch
37_fix_legacy_persistence_handling.patch
-38_do_not_check_for_forensic_in_readonly_mode.patch
39_persistence_with_forensic.patch
# this is needed because dpatch doesn't do file modes on diffs
# and we can't execute this fix during build stage as new files
# might be installed during dh_quilt_patch
- chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/scripts/live-bottom/*
+ chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/scripts/*
chmod a+rx debian/live-boot-grml-initramfs-tools/usr/share/initramfs-tools/hooks/*
override_dh_builddeb: