From f1ffcdaec3260272c12ac8d5ea15cf7af96482fd Mon Sep 17 00:00:00 2001 From: Andrew Cady Date: Sun, 1 May 2016 03:41:25 -0400 Subject: remove unused functions --- src/initrd/common.sh | 46 ++++++++++------------------------------------ 1 file changed, 10 insertions(+), 36 deletions(-) (limited to 'src') diff --git a/src/initrd/common.sh b/src/initrd/common.sh index 4aa8528..09906d9 100644 --- a/src/initrd/common.sh +++ b/src/initrd/common.sh @@ -17,17 +17,20 @@ debug_log() set -x fi } + addmenu() { cat <>$MENUFIFO # mind the tabs setItem "$1" "dummy" "$2" "$3" END } + menutitle() { printf 'setTitle "%s"\n' "$1" >>$MENUFIFO printf 'setWelcomeText "%s"\n' "$2" >>$MENUFIFO } + bootmenu() { local do_trigger="$1" no_panic="$2" @@ -43,30 +46,7 @@ bootmenu() udevadm trigger --subsystem-match=block --action=add fi } -find_squashfs_root() -{ - # TODO: "make" puts the correct location in $iso_squashfs_dir. Get - # information into this function! - bootwait samizdat-cdrom - for dir in /cdrom/live /cdrom/liveos /cdrom/aptosid /cdrom/* - do - [ -d "$dir" ] || continue; - if [ -f "$dir"/filesystem.module ]; then - while read fs; do - [ -f "$dir"/"$fs" ] && echo "$dir" "$fs" - done < "$dir"/filesystem.module - return - fi - done - for fs in /cdrom/live/filesystem.squashfs /cdrom/live/grml-small.squashfs /cdrom/liveos/squashfs.img /cdrom/aptosid/aptosid.* /cdrom/*/*.squashfs - do - if [ -f "$fs" ]; then - echo "${fs%/*}" "${fs##*/}" - break - fi - done -} xtrace() { case "$-" in @@ -74,6 +54,7 @@ xtrace() *) set -x; "$@"; set +x ;; esac } + sleepcmd() { local t=$1 shift @@ -81,13 +62,16 @@ sleepcmd() { sleep $t "$@" } + sleep_forever_verbose() { sleep 4294967295 & local sleep=$! warn "sleeping until you kill $sleep..." wait $sleep } + warn() { [ -z "$warnings" ] || echo "$@" >&2; } + panic() { set +x @@ -99,6 +83,7 @@ panic() chvt 1 exec /bin/sh -i } + bootwait() { mkdir -p /bootwait @@ -108,6 +93,7 @@ bootwait() done wait_for_files "$@" } + bootdone() { mkdir -p /bootwait @@ -117,6 +103,7 @@ bootdone() done touch "$@" } + my_openvt() { /bin/openvt -c "$@" @@ -128,16 +115,3 @@ gpg2_nobatch() { GPG_TTY=$(tty) command gpg2 --ignore-time-conflict --ignore-val gpg2() { gpg2_nobatch --batch "$@"; } xcp() { if [ -f "$1" -a ! -f "$2" ]; then cp "$1" "$2"; fi; } - -mountsquashes() -{ - local name dirname basename - while read dirname basename && [ -d "$dirname" -a -f "$dirname/$basename" ]; do - name=${basename%.squashfs} - mkdir -p "/squashes/$name" || return 1 - xcp "$dirname"/filesystem.module /squashes/filesystem.module || return 1 - mountpoint -q "/squashes/$name" || - mount -o ro,loop "$dirname/$basename" "/squashes/$name" || return 1 - done -} - -- cgit v1.2.3