From 32e8ef9f9794a1a9747673523b7c9e74bba1295c Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sat, 14 Jul 2007 13:46:44 +0000 Subject: Removed late_dm option (too confusing and too little effect), small fix for Ubuntu functions-default, added "binfinder" function. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1242 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 543b1887..1690b03b 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -195,6 +195,24 @@ else fi } ############################################################################# +# replacement for which command to find executables inside stage4 rootfs +binfinder() +{ +local program="$1" +local s4path +local notfound=1 +for s4path in bin sbin usr/bin usr/sbin usr/local/bin \ + usr/local/sbin usr/bin/X11; do + if [ -f "/mnt/$s4path/$program" ] && \ + [ -x "/mnt/$s4path/$program" ]; then + printf '%s\n' "/$s4path/$program" + notfound=0 + break + fi +done +return $notfound +} +############################################################################# # disk formatter and mounter. some proper error message output should be # added diskfm () { -- cgit v1.2.3-55-g7522