+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 12_uuid_support.dpatch by Michael Prokop <prokop@grml-forensic.org>
-##
-## DP: This patch enables support for verifying the ISO through bootid=.... bootoption.
-## DP: Logic behind bootoptions and possible combinations:
-## DP: * bootid.txt + wrong bootid=... => fails to boot
-## DP: * bootid.txt + right bootid=... => boots
-## DP: * bootid.txt + ignore_bootid => boots
-## DP: * bootid.txt + no bootid=... + no ignore_bootid => fails to boot
-## DP: * no bootid.txt + no bootid=... + no ignore_bootid => boots
-## DP: * no bootid.txt + bootid=... => fails to boot
-## DP: * no bootid.txt + ignore_bootid=... => boots
-
-@DPATCH@
-Index: live-boot-grml/components/9990-misc-helpers.sh
-===================================================================
---- live-boot-grml.orig/components/9990-misc-helpers.sh 2014-03-08 13:25:32.293262071 +0100
-+++ live-boot-grml/components/9990-misc-helpers.sh 2014-03-08 13:25:32.289262541 +0100
-@@ -15,6 +15,42 @@
- return 1
- }
-
-+grml_match_bootid()
-+{
-+ path="$1"
-+
-+ if [ -n "$IGNORE_BOOTID" ] ; then
-+ echo " * Ignoring verification of bootid.txt as requested via ignore_bootid.">>/boot.log
-+ return 0
-+ fi
-+
-+ if [ -n "$BOOTID" ] && ! [ -r "${path}/conf/bootid.txt" ] ; then
-+ echo " * Warning: bootid=... specified but no bootid.txt found on currently requested device.">>/boot.log
-+ return 1
-+ fi
-+
-+ [ -r "${path}/conf/bootid.txt" ] || return 0
-+
-+ bootid_conf=$(cat "${path}/conf/bootid.txt")
-+
-+ if [ -z "$BOOTID" -a -z "$IGNORE_BOOTID" ]
-+ then
-+ echo " * Warning: bootid.txt found but ignore_bootid / bootid=.. bootoption missing...">>/boot.log
-+ return 1
-+ fi
-+
-+ if [ "$BOOTID" = "$bootid_conf" ]
-+ then
-+ echo " * Successfully verified /conf/bootid.txt from ISO, continuing... ">>/boot.log
-+ else
-+ echo " * Warning: BOOTID of ISO does not match. Retrying and continuing search...">>/boot.log
-+ return 1
-+ fi
-+
-+ return 0
-+}
-+
-+
- matches_uuid ()
- {
- if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
-@@ -214,7 +250,7 @@
- fi
-
- if is_live_path ${mountpoint} && \
-- ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
-+ ([ "${skip_uuid_check}" ] || grml_match_bootid ${mountpoint})
- then
- echo ${mountpoint}
- return 0
-@@ -310,19 +346,6 @@
- return 0
- fi
- done
-- elif [ "${fstype}" = "squashfs" -o \
-- "${fstype}" = "btrfs" -o \
-- "${fstype}" = "ext2" -o \
-- "${fstype}" = "ext3" -o \
-- "${fstype}" = "ext4" -o \
-- "${fstype}" = "jffs2" ]
-- then
-- # This is an ugly hack situation, the block device has
-- # an image directly on it. It's hopefully
-- # live-boot, so take it and run with it.
-- ln -s "${devname}" "${devname}.${fstype}"
-- echo "${devname}.${fstype}"
-- return 0
- fi
- done
-
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 13:25:32.293262071 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:25:32.289262541 +0100
-@@ -18,6 +18,11 @@
- BOOTIF="${_PARAMETER#BOOTIF=}"
- ;;
-
-+ bootid=*)
-+ BOOTID="${_PARAMETER#bootid=}"
-+ export BOOTID
-+ ;;
-+
- dhcp)
- # Force dhcp even while netbooting
- # Use for debugging in case somebody works on fixing dhclient
-@@ -79,6 +84,11 @@
- export FROMISO
- ;;
-
-+ ignore_bootid)
-+ IGNORE_BOOTID="Yes"
-+ export IGNORE_BOOTID
-+ ;;
-+
- ignore_uuid)
- IGNORE_UUID="true"
- export IGNORE_UUID
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 13_always_display_warnings_and_failures.dpatch by Michael Prokop <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Always display failure and warning messages.
-
-@DPATCH@
-Index: live-boot-grml/components/9990-initramfs-tools.sh
-===================================================================
---- live-boot-grml.orig/components/9990-initramfs-tools.sh 2014-03-08 13:26:25.866978105 +0100
-+++ live-boot-grml/components/9990-initramfs-tools.sh 2014-03-08 13:26:25.862978575 +0100
-@@ -2,6 +2,17 @@
-
- #set -e
-
-+# we definitely want this stuff visible
-+log_failure_msg()
-+{
-+ printf "Failure: $@\n"
-+}
-+
-+log_warning_msg()
-+{
-+ printf "Warning: $@\n"
-+}
-+
- log_wait_msg ()
- {
- # Print a message and wait for enter
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 15_networking_grml.dpatch by Christian Hofstaedtler <ch@grml.org>
-## Licensed under GPLv2+.
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Ship our own networking script, which is compatible with the kernel's
-## DP: notion of ip= as well as resolvconf.
-
-@DPATCH@
-
-diff a/scripts/live-bottom/23networking_grml b/scripts/live-bottom/23networking_grml
-Index: live-boot-grml/components/9990-grml-networking.sh
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ live-boot-grml/components/9990-grml-networking.sh 2014-03-08 16:34:29.800254396 +0100
-@@ -0,0 +1,120 @@
-+#!/bin/sh
-+
-+#set -e
-+
-+Grml_Networking () {
-+
-+if [ -n "${NONETWORKING}" ]; then
-+ return 0
-+fi
-+
-+modprobe af_packet # req'd for DHCP
-+
-+# initialize udev
-+# (this /might/ be required for firmware loading to complete)
-+if grep -q noudev /proc/cmdline; then
-+ log_begin_msg "Networking: Skipping udev as requested via bootoption noudev."
-+else
-+ udevadm trigger
-+ udevadm settle
-+fi
-+
-+if [ -n "${IP}" ]; then
-+ # call into initramfs-tools provided network setup functions, so basic
-+ # networking is fine.
-+ log_begin_msg "Networking: Waiting for basic network to come up..."
-+ configure_networking
-+fi
-+
-+# prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
-+IFFILE="/root/etc/network/interfaces"
-+if [ -L /root/etc/resolv.conf ] ; then
-+ # assume we have resolvconf
-+ RESOLVCONF=/root/etc/resolvconf/resolv.conf.d/base
-+else
-+ RESOLVCONF="/root/etc/resolv.conf"
-+fi
-+
-+# config for loopback networking
-+cat > $IFFILE << EOF
-+# Initially generated on boot by initramfs' 23networking.
-+
-+auto lo
-+iface lo inet loopback
-+
-+EOF
-+
-+unset HOSTNAME
-+
-+# generate config for each present network device
-+for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*; do
-+ [ -e ${interface} ] || continue
-+ interface=$(basename ${interface})
-+ method="dhcp"
-+
-+ # NODHCP or a previously run ipconfig mean that ifupdown should never
-+ # touch this interface (IP-stack wise).
-+ netconfig=/run/net-${interface}.conf
-+ if [ -n "$NODHCP" ] || [ -e "${netconfig}" ]; then
-+ method="manual"
-+ fi
-+
-+ # if boot option "nodhcp" is set but also boot option "dhcp" is
-+ # 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" = "true" ] ; then
-+ method="dhcp"
-+ fi
-+
-+ cat >> $IFFILE << EOF
-+allow-hotplug ${interface}
-+iface ${interface} inet ${method}
-+EOF
-+
-+ # DNS for resolvconf and /etc/resolv.conf
-+ if [ -e "${netconfig}" ]; then
-+ . "${netconfig}"
-+ if [ -n "${DNSDOMAIN}" ]; then
-+ echo " dns-search ${DNSDOMAIN}" >> $IFFILE
-+ fi
-+ # make sure we don't have any 0.0.0.0 nameservers
-+ IPV4DNSLIST=""
-+ for IPV4DNS in ${IPV4DNS0} ${IPV4DNS1}; do
-+ [ -n "${IPV4DNS}" ] || continue
-+ [ "${IPV4DNS}" != "0.0.0.0" ] || continue
-+ IPV4DNSLIST="${IPV4DNSLIST}${IPV4DNS} "
-+ done
-+ if [ -n "${IPV4DNSLIST}" ]; then
-+ echo " dns-nameservers ${IPV4DNSLIST}" >> $IFFILE
-+ for IPV4DNS in ${IPV4DNSLIST}; do
-+ echo "nameserver ${IPV4DNS}" >> $RESOLVCONF
-+ done
-+ fi
-+ fi
-+
-+ if [ -z "$NODHCPHOSTNAME" -a -n "$HOSTNAME" ]; then
-+ echo $HOSTNAME > /root/etc/hostname
-+ fi
-+
-+ unset DEVICE IPV4ADDR IPV4BROADCAST IPV4NETMASK IPV4GATEWAY IPV4DNS0 IPV4DNS1 HOSTNAME DNSDOMAIN NISDOMAIN ROOTSERVER ROOTPATH filename
-+ unset IPV4DNS IPV4DNSLIST
-+
-+ echo>> $IFFILE
-+done
-+
-+# dns bootoption
-+if [ -n "$DNSSERVER1" ]
-+then
-+ # disable any existing entries
-+ if [ -r $RESOLVCONF ]
-+ then
-+ sed -i 's/nameserver/# nameserver/' $RESOLVCONF
-+ fi
-+ for i in $DNSSERVER1 $DNSSERVER2
-+ do
-+ echo "nameserver $i" >> $RESOLVCONF
-+ done
-+fi
-+
-+}
-Index: live-boot-grml/components/9990-main.sh
-===================================================================
---- live-boot-grml.orig/components/9990-main.sh 2014-03-08 16:27:40.668243817 +0100
-+++ live-boot-grml/components/9990-main.sh 2014-03-08 16:27:40.664244286 +0100
-@@ -195,6 +195,8 @@
-
- Swap
-
-+ Grml_Networking
-+
- exec 1>&6 6>&-
- exec 2>&7 7>&-
- kill ${tailpid}
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 16:27:34.117012248 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 16:33:20.536378749 +0100
-@@ -33,6 +33,8 @@
- nodhcp)
- DHCP=""
- export DHCP
-+ NODHCP="Yes"
-+ export NODHCP
- ;;
-
- ethdevice=*)
-@@ -150,6 +152,11 @@
- export NFS_COW
- ;;
-
-+ nodhcphostname)
-+ NODHCPHOSTNAME="Yes"
-+ export NODHCPHOSTNAME
-+ ;;
-+
- nofstab)
- NOFSTAB="true"
- export NOFSTAB
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 26_support_dns_bootoption.dpatch by Michael Prokop <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4
-
-@DPATCH@
-Index: live-boot-grml/components/9990-networking.sh
-===================================================================
---- live-boot-grml.orig/components/9990-networking.sh 2014-03-08 13:33:11.615385566 +0100
-+++ live-boot-grml/components/9990-networking.sh 2014-03-08 13:33:11.611386038 +0100
-@@ -151,7 +151,7 @@
- echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
- fi
-
-- for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
-+ for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVER1} ${DNSSERVER2}
- do
- if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
- then
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 13:33:11.615385566 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:33:11.611386038 +0100
-@@ -18,6 +18,19 @@
- BOOTIF="${_PARAMETER#BOOTIF=}"
- ;;
-
-+ dns=*)
-+ DNSSERVER="${_PARAMETER#*=}"
-+ if echo "${DNSSERVER}" | grep -q , ; then
-+ DNSSERVER1="${DNSSERVER%,*}"
-+ DNSSERVER2="${DNSSERVER#*,}"
-+ export DNSSERVER1 DNSSERVER2
-+ else
-+ DNSSERVER1="$DNSSERVER"
-+ export DNSSERVER1
-+ fi
-+ unset DNSSERVER
-+ ;;
-+
- bootid=*)
- BOOTID="${_PARAMETER#bootid=}"
- export BOOTID
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 27_support_staticip.dpatch by <mru@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-
-@DPATCH@
-
-Index: live-boot-grml/components/9990-networking.sh
-===================================================================
---- live-boot-grml.orig/components/9990-networking.sh 2014-03-08 13:35:17.832580835 +0100
-+++ live-boot-grml/components/9990-networking.sh 2014-03-08 13:35:33.106789237 +0100
-@@ -44,7 +44,7 @@
-
- if [ "$bootif_mac" = "$current_mac" ]
- then
-- DEVICE=${device##*/}
-+ ETHDEVICE="${device##*/},$ETHDEVICE" # use ethdevice
- break
- fi
- fi
-@@ -52,6 +52,24 @@
- fi
- }
-
-+get_ipconfig_para()
-+{
-+ if [ $# != 1 ] ; then
-+ echo "Missin parameter for $0"
-+ return
-+ fi
-+ devname=$1
-+ for ip in ${STATICIP} ; do
-+ case $ip in
-+ *:$devname:*)
-+ echo $ip
-+ return
-+ ;;
-+ esac
-+ done
-+ echo $devname
-+}
-+
- do_netsetup ()
- {
- modprobe -q af_packet # For DHCP
-@@ -62,8 +80,20 @@
- [ -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}" ]
-- then
-+ # Our modus operandi for getting a working network setup is this:
-+ # * If ip=* is set, pass that to ipconfig and be done
-+ # * Else, try dhcp on all devices in this order:
-+ # ethdevice= bootif= <all interfaces>
-+
-+ ALLDEVICES="$(cd /sys/class/net/ && ls -1 2>/dev/null | grep -v '^lo$' )"
-+
-+ # Turn on all interfaces before doing anything, to avoid timing problems
-+ # during link negotiation.
-+ 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
-+
- # See if we can select the device from BOOTIF
- Device_from_bootif
-
-@@ -73,14 +103,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
-
- # split args of ethdevice=eth0,eth1 into "eth0 eth1"
-@@ -89,42 +112,29 @@
- 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 /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
-- done
-- else
-- for interface in ${DEVICE}; do
-- ipconfig -t "$ETHDEV_TIMEOUT" ${interface} | tee /netboot-${interface}.config
--
-- [ -e /run/net-${interface}.conf ] && . /run/net-${interface}.conf
--
-- if [ "$IPV4ADDR" != "0.0.0.0" ]
-- then
-- break
-+ if [ "${IPV4ADDR}" != "0.0.0.0" ]; then
-+ export DEVICE="$dev $DEVICE"
-+ # break # exit loop as we just use the irst
- fi
- done
-- fi
-+ unset devlist
-
- for interface in ${DEVICE}
- do
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 13:35:17.832580835 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:35:17.828581304 +0100
-@@ -51,9 +51,8 @@
- ;;
-
- ethdevice=*)
-- DEVICE="${_PARAMETER#ethdevice=}"
-- ETHDEVICE="${DEVICE}"
-- export DEVICE ETHDEVICE
-+ ETHDEVICE="${_PARAMETER#ethdevice=}"
-+ export ETHDEVICE
- ;;
-
- ethdevice-timeout=*)
-@@ -110,13 +109,9 @@
- ;;
-
- ip=*)
-- STATICIP="${_PARAMETER#ip=}"
--
-- if [ -z "${STATICIP}" ]
-- then
-- STATICIP="frommedia"
-- fi
--
-+ # copy complete ip=args into staticip, and
-+ # keep multiple uses.
-+ STATICIP="${STATICIP} ${_PARAMETER}"
- export STATICIP
- ;;
-
+++ /dev/null
-commit 10caf0b2db3fc04fae24ca896cf21f6aed12bbbc
-Author: Christian Hofstaedtler <ch@grml.org>
-Date: Fri Mar 25 23:02:38 2011 +0100
-
- support DNS in boot environment
-
- Thanks to Ulrich Dangel for discovering this. [Closes: issue848]
-
---- a/backend/initramfs-tools/live.hook
-+++ b/backend/initramfs-tools/live.hook
-@@ -228,23 +228,26 @@
-
- # Some experimental stuff
-
--case "${LIVE_DNS}" in
-- true)
-- [ "${QUIET}" ] || echo -n " dns"
--
-- # /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
--
-- # might be needed if /etc/hosts is used
-- #mkdir -p "${DESTDIR}/etc"
-- #cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
-- ;;
--esac
-+[ "${QUIET}" ] || echo -n " dns"
-+
-+# /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
-+
-+# might be needed if /etc/hosts is used
-+#mkdir -p "${DESTDIR}/etc"
-+#cp -p /etc/nsswitch.conf "${DESTDIR}/etc"
-+
-+# vlan support
-+if [ -x /sbin/vconfig ]
-+then
-+ copy_exec /sbin/vconfig
-+ manual_add_modules 8021q
-+fi
-
- [ "${QUIET}" ] || echo .
+++ /dev/null
-Index: live-boot-grml/hooks/kms
-===================================================================
---- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ live-boot-grml/backend/initramfs-tools/kms.hook 2011-12-06 22:09:55.000000000 +0100
-@@ -0,0 +1,25 @@
-+#!/bin/sh
-+# hook for adding kms modules
-+
-+set -e
-+
-+# initramfs-tools header
-+
-+PREREQ=""
-+prereqs()
-+{
-+ echo "${PREREQ}"
-+}
-+
-+case "${1}" in
-+ prereqs)
-+ prereqs
-+ exit 0
-+ ;;
-+esac
-+
-+. /usr/share/initramfs-tools/hook-functions
-+
-+for module in i915 radeon nouveau ; do
-+ manual_add_modules $module
-+done
+++ /dev/null
-commit d4619b77a669c70ae68d5da34de7655ffef80e04
-Author: Michael Prokop <mika@grml.org>
-Date: Mon Jul 11 12:42:24 2011 +0200
-
- Try loading phram module twice to fix loading issue.
-
- phram doesn't work on first modprobe, when loading once again it seems
- to work. So let's try it this way.
-
-Index: live-boot-grml/components/9990-main.sh
-===================================================================
---- live-boot-grml.orig/components/9990-main.sh 2014-03-08 13:38:03.673128454 +0100
-+++ live-boot-grml/components/9990-main.sh 2014-03-08 13:38:03.669128922 +0100
-@@ -58,6 +58,7 @@
- then
- # We found a memdisk, set up phram
- modprobe phram phram=memdisk,${MEMDISK}
-+ modprobe phram phram=memdisk,${MEMDISK}
-
- # Load mtdblock, the memdisk will be /dev/mtdblock0
- modprobe mtdblock
+++ /dev/null
-Index: live-boot-grml/components/9990-misc-helpers.sh
-===================================================================
---- live-boot-grml.orig/components/9990-misc-helpers.sh 2014-03-08 13:38:26.286476006 +0100
-+++ live-boot-grml/components/9990-misc-helpers.sh 2014-03-08 13:38:26.282476475 +0100
-@@ -443,6 +443,12 @@
- return 1
- fi
-
-+ # get_fstype might report "unknown" or "swap", ignore it as no such kernel module exists
-+ if [ "${fstype}" = "unknown" ] || [ "${fstype}" = "swap" ]
-+ then
-+ return 1
-+ fi
-+
- # Try to look if it is already supported by the kernel
- if grep -q ${fstype} /proc/filesystems
- then
+++ /dev/null
---- a/components/0020-read-only
-+++ b/components/0020-read-only
-@@ -53,4 +53,20 @@
- ;;
- esac
- done
-+
-+ if grep -qe persistence /proc/cmdline
-+ 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 persistence
-+ do
-+ 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
-+ blockdev --setrw $device && printf "done\n" >/dev/console || printf "failed\n" >/dev/console
-+ fi
-+ done
-+ fi
-+
- }
+++ /dev/null
-Index: live-boot-grml/Makefile
-===================================================================
---- live-boot-grml.orig/Makefile 2014-03-08 13:42:04.748851311 +0100
-+++ live-boot-grml/Makefile 2014-03-08 13:42:04.744851781 +0100
-@@ -47,9 +47,13 @@
-
- # Installing executables
- mkdir -p $(DESTDIR)/usr/share/initramfs-tools/hooks
-- cp backend/initramfs-tools/live.hook $(DESTDIR)/usr/share/initramfs-tools/hooks/live
-+ for f in backend/initramfs-tools/*.hook; do \
-+ cp $${f} $(DESTDIR)/usr/share/initramfs-tools/hooks/$$(basename $${f} .hook); \
-+ done
- mkdir -p $(DESTDIR)/usr/share/initramfs-tools/scripts
-- cp backend/initramfs-tools/live.script $(DESTDIR)/usr/share/initramfs-tools/scripts/live
-+ for f in backend/initramfs-tools/*.script; do \
-+ cp $${f} $(DESTDIR)/usr/share/initramfs-tools/scripts/$$(basename $${f} .script); \
-+ done
-
- mkdir -p $(DESTDIR)/bin
- cp frontend/* $(DESTDIR)/bin
+++ /dev/null
---- a/components/9990-cmdline-old
-+++ b/components/9990-cmdline-old
-@@ -266,6 +266,11 @@
- UNIONTYPE="${_PARAMETER#union=}"
- export UNIONTYPE
- ;;
-+
-+ vlan=*)
-+ VLANS="${VLANS} ${_PARAMETER#vlan=}"
-+ export VLANS
-+ ;;
- esac
- done
-
---- a/components/9990-grml-networking.sh
-+++ b/components/9990-grml-networking.sh
-@@ -67,10 +67,39 @@
- method="dhcp"
- fi
-
-- cat >> $IFFILE << EOF
-+ if [ -n "$VLANS" ] ; then
-+ modprobe 8021q
-+
-+ # vlan=<vid>:<phydevice>
-+ for line in $(echo $VLANS | sed 's/ /\n'/) ; do
-+ vlandev=${line#*:}
-+ vlanid=${line%:*}
-+
-+ if [ -n "$vlandev" ] && [ -n "$vlanid" ] ; then
-+ case "$vlandev" in
-+ "$interface")
-+ vlan_raw_dev=$interface
-+ interface="${vlandev}.${vlanid}"
-+ ;;
-+ esac
-+ fi
-+ done
-+ fi
-+
-+ if [ -n "$vlan_raw_dev" ] ; then
-+ cat >> $IFFILE << EOF
-+auto ${interface}
-+iface ${interface} inet ${method}
-+ vlan-raw-device $vlan_raw_dev
-+EOF
-+ else
-+ cat >> $IFFILE << EOF
- allow-hotplug ${interface}
- iface ${interface} inet ${method}
- EOF
-+ fi
-+
-+ unset vlandev vlanid vlan_raw_dev # unset variables to have clean state for next device
-
- # DNS for resolvconf and /etc/resolv.conf
- if [ -e "${netconfig}" ]; then
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 05_boot_failure_message_grml.dpatch by <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Copy /etc/grml_version to initrd
-
-@DPATCH@
-
-Index: live-boot-grml/components/9990-initramfs-tools.sh
-===================================================================
---- live-boot-grml.orig/components/9990-initramfs-tools.sh 2014-03-08 13:20:10.746978063 +0100
-+++ live-boot-grml/components/9990-initramfs-tools.sh 2014-03-08 13:20:10.742978533 +0100
-@@ -52,14 +52,20 @@
- printf "\n\n"
- printf " \033[1;37mBOOT FAILED!\033[0m\n"
- printf "\n"
-- printf " This Live System image failed to boot.\n\n"
-+ printf " This image failed to boot.\n\n"
-
-- printf " Please file a bug against the 'live-boot' package or email the Live Systems\n"
-- printf " mailing list at <debian-live@lists.debian.org>, making sure to note the\n"
-- printf " exact version, name and distribution of the image you were attempting to boot.\n\n"
-+ printf " Please file a bug at your distributors bug tracking system, making\n"
-+ printf " sure to note the exact version, name and distribution of the image\n"
-+ printf " you were attempting to boot.\n\n"
-+
-+ if [ -r /etc/grml_version ]
-+ then
-+ GRML_VERSION="$(cat /etc/grml_version)"
-+ printf " $GRML_VERSION\n\n"
-+ fi
-
- printf " The file ${LIVELOG} contains some debugging information but booting with the\n"
-- printf " ${DEBUG} command-line parameter will greatly increase its verbosity which is\n"
-+ printf " ${DEBUG}=1 command-line parameter will greatly increase its verbosity which is\n"
- printf " extremely useful when diagnosing issues.\n\n"
-
- if [ -n "${panic}" ]; then
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 08_grml_defaults.dpatch by Christian Hofstaedtler <ch@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Pseudo-brand as grml
-
-@DPATCH@
-Index: live-boot-grml/components/9990-aaa-fixme.sh
-===================================================================
---- live-boot-grml.orig/components/9990-aaa-fixme.sh 2014-03-08 13:20:56.901564329 +0100
-+++ live-boot-grml/components/9990-aaa-fixme.sh 2014-03-08 13:20:56.897564798 +0100
-@@ -10,7 +10,7 @@
- alt_mountpoint="/media"
- LIVE_MEDIA_PATH="live"
-
--HOSTNAME="host"
-+HOSTNAME="grml"
-
- mkdir -p "${mountpoint}"
- mkdir -p /var/lib/live/boot
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 03_grml_version_file_hook.dpatch by <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Copy /etc/grml_version to initrd
-
-@DPATCH@
-
-Index: live-boot-grml/backend/initramfs-tools/live.hook
-===================================================================
---- live-boot-grml.orig/backend/initramfs-tools/live.hook 2014-03-08 13:18:27.443095163 +0100
-+++ live-boot-grml/backend/initramfs-tools/live.hook 2014-03-08 13:18:27.439095633 +0100
-@@ -16,6 +16,12 @@
- fi
- done
-
-+# Grml version information:
-+if [ -r /etc/grml_version ]
-+then
-+ cp /etc/grml_version "${DESTDIR}"/etc
-+fi
-+
- # Checking live-boot
- if [ ! -e /bin/live-boot ]
- then
+++ /dev/null
-Index: live-boot-grml/Makefile
-===================================================================
---- live-boot-grml.orig/Makefile 2014-03-08 13:36:52.857434829 +0100
-+++ live-boot-grml/Makefile 2014-03-08 13:36:52.853435298 +0100
-@@ -55,8 +55,8 @@
- cp frontend/* $(DESTDIR)/bin
-
- # Installing docs
-- mkdir -p $(DESTDIR)/usr/share/doc/live-boot
-- cp -r COPYING $(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
-
- # Installing manpages
- for MANPAGE in manpages/en/*; \
-@@ -90,7 +90,7 @@
- rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
-
- # Uninstalling docs
-- rm -rf $(DESTDIR)/usr/share/doc/live-boot
-+ rm -rf $(DESTDIR)/usr/share/doc/live-boot-grml
- rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share/doc > /dev/null 2>&1 || true
- rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr/share > /dev/null 2>&1 || true
- rmdir --ignore-fail-on-non-empty $(DESTDIR)/usr > /dev/null 2>&1 || true
+++ /dev/null
-Author: Michael Prokop <mika@grml.org>
-Date: Mon Dec 17 16:31:42 CET 2012
-
- Drop nameserver handling from ip= boot parameter.
-
-In commit ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2
-("Adding support for nameserver in ip= boot parameter.")
-Debian's live-boot added support for handling nameserver
-option inside the ip= boot parameter.
-
-This violates the ip= handling as documented in
-https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
-
---- a/components/9990-netbase.sh
-+++ b/components/9990-netbase.sh
-@@ -44,7 +44,6 @@
- ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
- ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
- ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
-- nameserver="$(echo ${ifline} | cut -f5 -d ':')"
-
- cat >> "${IFFILE}" << EOF
- allow-hotplug ${ifname}
-@@ -62,17 +61,6 @@
- EOF
-
- fi
--
-- if [ -n "${nameserver}" ]
-- then
-- if [ -e "${DNSFILE}" ]
-- then
-- grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
-- mv "${DNSFILE}.tmp" "${DNSFILE}"
-- fi
--
-- echo "nameserver ${nameserver}" >> "${DNSFILE}"
-- fi
- done
- else
- if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
+++ /dev/null
-From: Evgeni Golov <evgeni@debian.org>
-Subject: restore support for old persistence media
-
-Index: live-boot-grml/components/9990-aaa-fixme.sh
-===================================================================
---- live-boot-grml.orig/components/9990-aaa-fixme.sh 2014-03-08 13:43:19.172121783 +0100
-+++ live-boot-grml/components/9990-aaa-fixme.sh 2014-03-08 13:43:19.164122722 +0100
-@@ -26,5 +26,8 @@
- export PATH
- fi
-
-+old_root_overlay_label="live-rw"
-+old_home_overlay_label="home-rw"
- custom_overlay_label="persistence"
-+old_custom_overlay_label="custom-ov"
- persistence_list="persistence.conf"
-Index: live-boot-grml/components/9990-misc-helpers.sh
-===================================================================
---- live-boot-grml.orig/components/9990-misc-helpers.sh 2014-03-08 13:43:19.172121783 +0100
-+++ live-boot-grml/components/9990-misc-helpers.sh 2014-03-08 13:43:19.168122252 +0100
-@@ -1632,6 +1632,32 @@
- echo ${used_devices}
- }
-
-+fix_backwards_compatibility ()
-+{
-+ local device dir opt backing include_list
-+ device=${1}
-+ dir=${2}
-+ opt=${3}
-+
-+ if [ -n "${PERSISTENCE_READONLY}" ]
-+ then
-+ return
-+ fi
-+
-+ backing="$(mount_persistence_media ${device})"
-+ if [ -z "${backing}" ]
-+ then
-+ return
-+ fi
-+
-+ include_list="${backing}/${persistence_list}"
-+ if [ ! -r "${include_list}" ] && [ ! -r "${backing}/${old_persistence_list}" ]
-+ then
-+ echo "# persistence backwards compatibility:
-+${dir} ${opt},source=." > "${include_list}"
-+ fi
-+}
-+
- is_mountpoint ()
- {
- directory="$1"
-Index: live-boot-grml/components/9990-overlay.sh
-===================================================================
---- live-boot-grml.orig/components/9990-overlay.sh 2014-03-08 13:43:19.172121783 +0100
-+++ live-boot-grml/components/9990-overlay.sh 2014-03-08 13:43:19.168122252 +0100
-@@ -210,7 +210,7 @@
-
- if is_in_comma_sep_list overlay ${PERSISTENCE_METHOD}
- then
-- overlays="${custom_overlay_label}"
-+ overlays="${old_root_overlay_label} ${old_home_overlay_label} ${custom_overlay_label} ${old_custom_overlay_label}"
- fi
-
- local overlay_devices
-@@ -222,10 +222,27 @@
- media="$(echo ${media} | tr ":" " ")"
-
- case ${media} in
-+ ${old_root_overlay_label}=*)
-+ device="${media#*=}"
-+ fix_backwards_compatibility ${device} / union
-+ overlay_devices="${overlay_devices} ${device}"
-+ ;;
-+
-+ ${old_home_overlay_label}=*)
-+ device="${media#*=}"
-+ fix_backwards_compatibility ${device} /home bind
-+ overlay_devices="${overlay_devices} ${device}"
-+ ;;
-+
- ${custom_overlay_label}=*)
- device="${media#*=}"
- overlay_devices="${overlay_devices} ${device}"
- ;;
-+
-+ ${old_custom_overlay_label}=*)
-+ device="${media#*=}"
-+ overlay_devices="${overlay_devices} ${device}"
-+ ;;
- esac
- done
- fi
+++ /dev/null
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 19_revert_toram_bootoption_to_expected_behaviour.dpatch by Michael Prokop <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Revert toram bootoption to expected behaviour.
-## DP:
-## DP: In commit 36bb11382c81d5bce4b69f6d3d618dfd1c38dffb
-## DP: of live-initramfs-grml (when merging Debian's version 1.157.4-1)
-## DP: the behaviour of toram bootoption was modified, see
-## DP: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=534878
-## DP:
-## DP: On Grml we want to have the option to load the whole medium
-## DP: into RAM to e.g. have additional directories like /deb,
-## DP: /scripts or whatever. This is possible using the toram bootoption
-## DP: without any additional arguments.
-## DP:
-## DP: If you do NOT want to load the whole medium to RAM just
-## DP: boot using toram=grml.squashfs (or whatever it's named,
-## DP: there's a ready-to-use bootoption in Grml's bootsplash
-## DP: menu available) instead.
-## DP:
-## DP: Ammusingly the requested behaviour is available in Debian's
-## DP: live-boot if rsync is not available, so this patch
-## DP: actually just unifies the code paths and reverts the
-## DP: behaviour change back to what the log message says.
-
-@DPATCH@
-
-index d79beed..1b6926e 100755
---- a/components/9990-toram-todisk.sh
-+++ b/components/9990-toram-todisk.sh
-@@ -86,8 +86,7 @@
- echo " * Copying whole medium to RAM" 1>/dev/console
- rsync -a --progress ${copyfrom}/* ${copyto} 1>/dev/console # "cp -a" from busybox also copies hidden files
- else
-- mkdir -p ${copyto}/${LIVE_MEDIA_PATH}
-- cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/* ${copyto}/${LIVE_MEDIA_PATH}
-+ cp -a ${copyfrom}/* ${copyto}/
- if [ -e ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ]
- then
- cp -a ${copyfrom}/${LIVE_MEDIA_PATH}/.disk ${copyto}
+++ /dev/null
-grml-specific/grml_version_file_hook.patch
-grml-specific/boot_failure_message_grml.patch
-grml-specific/grml_defaults.patch
-12_uuid_support.patch
-13_always_display_warnings_and_failures.patch
-15_networking_grml.patch
-reverts/revert_toram_bootoption_to_expected_behaviour.patch
-26_support_dns_bootoption.patch
-27_support_static_ip.patch
-29_support_dns_in_initramfs.patch
-grml-specific/package_rename.patch
-32_add_kms.patch
-33_retry_phram.patch
-34_ignore_unknown_filesystems.patch
-39_persistence_with_forensic.patch
-40_support_multiple_hooks.patch
-reverts/drop_nameserver_from_ip_option.patch
-reverts/restore_support_for_old_persistence.patch
-41_vlan_support.patch