1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 12_uuid_support.dpatch by Michael Prokop <prokop@grml-forensic.org>
4 ## DP: This patch enables support for verifying the ISO through bootid=.... bootoption.
5 ## DP: Logic behind bootoptions and possible combinations:
6 ## DP: * bootid.txt + wrong bootid=... => fails to boot
7 ## DP: * bootid.txt + right bootid=... => boots
8 ## DP: * bootid.txt + ignore_bootid => boots
9 ## DP: * bootid.txt + no bootid=... + no ignore_bootid => fails to boot
10 ## DP: * no bootid.txt + no bootid=... + no ignore_bootid => boots
11 ## DP: * no bootid.txt + bootid=... => fails to boot
12 ## DP: * no bootid.txt + ignore_bootid=... => boots
15 diff -urNad live-initramfs-grml~/scripts/live live-initramfs-grml/scripts/live
16 --- live-initramfs-grml~/scripts/live 2010-02-01 20:31:44.410884646 +0100
17 +++ live-initramfs-grml/scripts/live 2010-02-01 20:32:09.131721944 +0100
23 + BOOTID="${ARGUMENT#bootid=}"
29 DEFCONSOLE="${ARGUMENT#*=}"
32 export USERFULLNAME LIVECONF
37 + export IGNORE_BOOTID
51 + if [ -n "$IGNORE_BOOTID" ] ; then
52 + echo " * Ignoring verification of bootid.txt as requested via ignore_bootid.">>/live.log
56 + if [ -n "$BOOTID" ] && ! [ -r "${path}/conf/bootid.txt" ] ; then
57 + echo " * Warning: bootid=... specified but no bootid.txt found on currently requested device.">>/live.log
61 + [ -r "${path}/conf/bootid.txt" ] || return 0
63 + bootid_conf=$(cat "${path}/conf/bootid.txt")
65 + if [ -z "$BOOTID" -a -z "$IGNORE_BOOTID" ]
67 + echo " * Warning: bootid.txt found but ignore_bootid / bootid=.. bootoption missing...">>/live.log
71 + if [ "$BOOTID" = "$bootid_conf" ]
73 + echo " * Successfully verified /conf/bootid.txt from ISO, continuing... ">>/live.log
75 + echo " * Warning: BOOTID of ISO does not match. Retrying and continuing search...">>/live.log
84 if [ "${IGNORE_UUID}" ] || [ ! -e /conf/uuid.conf ]
88 if is_live_path ${mountpoint} && \
89 - ([ "${skip_uuid_check}" ] || matches_uuid ${mountpoint})
90 + ([ "${skip_uuid_check}" ] || grml_match_bootid ${mountpoint})