diff options
author | Thomas Bächler <thomas@archlinux.org> | 2007-05-12 18:05:51 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2007-05-12 18:05:51 +0200 |
commit | 00e2615161b589f10d37001feab07ff8fc3d31ca (patch) | |
tree | da0b40a70c317ff0a87374fd08ea32fcab4c9737 | |
parent | c1c12f540ffbce793d94a191bc378c08a7258c4e (diff) | |
download | mkinitcpio-00e2615161b589f10d37001feab07ff8fc3d31ca.tar.gz mkinitcpio-00e2615161b589f10d37001feab07ff8fc3d31ca.tar.xz |
- fix a bug with BINARIES= (also accept shared objects, not only executables)
- fix some bugs introduced by phrakture (could you be more careful?)
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@204 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | functions | 6 | ||||
-rw-r--r-- | init | 14 | ||||
-rw-r--r-- | install/base | 7 |
3 files changed, 15 insertions, 12 deletions
@@ -39,7 +39,7 @@ die () { echo "FATAL: ${@}" >&2; exit 1; } add_full_dir () { - if [ -d "${1}" -a "x${1}" != "x" ]; then + if [ "x${1}" != "x" -a -d "${1}" ]; then for f in ${1}/*; do if [ -d "${f}" ]; then add_full_dir "${f}" @@ -53,7 +53,7 @@ add_full_dir () add_dir () { #skip root directory and "." for relative directories... i.e. /foo/bar/./blah - if [ "${1}" -a "x${1}" != "x" -a "${1}" != "/" -a "${1}" != "." ]; then + if [ "x${1}" != "x" -a "${1}" != "/" -a "${1}" != "." ]; then if ! grep "dir ${1} " "${FILELIST}" 2>&1 > /dev/null; then add_dir $(dirname "${1}") msg " adding dir ${1}" @@ -174,7 +174,7 @@ add_binary () msg " adding '${type}' script, ensure proper interp exists..." add_file "${bin}" ${dest} ;; - *executable*) + *executable*|*shared\ object*) add_file "${bin}" ${dest} #note, this will also handle 'not a dynamic executable' spit out by # static binaries... the deps will produce nothing @@ -14,7 +14,7 @@ export CMDLINE # Used so hooks can override params to kinit export kinit_params="" export root="" -echo "/bin/modprobe" > /proc/sys/kernel/modprobe +echo "/sbin/modprobe" > /proc/sys/kernel/modprobe for cmd in $CMDLINE; do case "$cmd" in @@ -110,11 +110,11 @@ if [ ! -e "${root}" ]; then PS1="ramfs$ " /bin/sh -i msg "Rebooting..." /bin/reboot -else - msg ":: Initramfs Completed - control passing to kinit" - if [ -f "/message" ]; then - msg "$(cat /message)" - fi +fi + +msg ":: Initramfs Completed - control passing to kinit" +if [ -f "/message" ]; then + msg "$(cat /message)" fi #Special handling if udev is running @@ -125,6 +125,4 @@ if [ "x${udevpid}" != "x" ]; then fi -echo "/sbin/modprobe" > /proc/sys/kernel/modprobe - exec /bin/kinit -- "root=${root}" ${kinit_params} "${runlevel}" > /dev/null 2>&1 diff --git a/install/base b/install/base index 78fbc1d..d1fc19b 100644 --- a/install/base +++ b/install/base @@ -15,7 +15,12 @@ install () done for f in /usr/lib/klibc/bin/*; do - add_file $f /bin/$(basename $f) + if [ "$(basename $f)" = "modprobe" ]; then + # force putting modprobe in /sbin + add_file $f /sbin/$(basename $f) + else + add_file $f /bin/$(basename $f) + fi done add_file "/lib/initcpio/init" "/init" |