diff options
author | Dirk von Suchodoletz | 2007-07-14 15:46:44 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-07-14 15:46:44 +0200 |
commit | 32e8ef9f9794a1a9747673523b7c9e74bba1295c (patch) | |
tree | 2cb3f26f77572cd2de5a68004e0ad8af9aaf8f0c /initramfs/initrd-stuff/etc/functions | |
parent | Fixes for gdm/kdm configuration in Ubuntu. Cleanup of functions-7.04 (unneeded (diff) | |
download | core-32e8ef9f9794a1a9747673523b7c9e74bba1295c.tar.gz core-32e8ef9f9794a1a9747673523b7c9e74bba1295c.tar.xz core-32e8ef9f9794a1a9747673523b7c9e74bba1295c.zip |
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
Diffstat (limited to 'initramfs/initrd-stuff/etc/functions')
-rw-r--r-- | initramfs/initrd-stuff/etc/functions | 18 |
1 files changed, 18 insertions, 0 deletions
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 () { |