diff options
author | Tobias Powalowski <tpowa@archlinux.org> | 2006-08-18 18:39:49 +0200 |
---|---|---|
committer | Tobias Powalowski <tpowa@archlinux.org> | 2006-08-18 18:39:49 +0200 |
commit | e3dd6e6b0b6b2e06cd5b42c25b3bd2320c2af530 (patch) | |
tree | a3164cb248e25463b93014cbbb5651e3b33b76db | |
parent | 3c903b6f507c0570938f9a9c7ee6f0f619d03bd5 (diff) | |
download | mkinitcpio-e3dd6e6b0b6b2e06cd5b42c25b3bd2320c2af530.tar.gz mkinitcpio-e3dd6e6b0b6b2e06cd5b42c25b3bd2320c2af530.tar.xz |
'upgpkg: removed unneeded base hook, updated init to use replace'
git-svn-id: http://projects.archlinux.org/svn/initramfs/mkinitcpio@160 880c04e9-e011-0410-abf7-b926e227c9cd
-rw-r--r-- | hooks/base | 9 | ||||
-rw-r--r-- | init | 18 |
2 files changed, 11 insertions, 16 deletions
diff --git a/hooks/base b/hooks/base deleted file mode 100644 index eccf591..0000000 --- a/hooks/base +++ /dev/null @@ -1,9 +0,0 @@ -# vim:set ft=sh: -run_hook () -{ - if [ -e "/sys/bus/pci" ]; then - msg -n "Loading base modules..." - /bin/modprobe -a -q $(/bin/cat /sys/bus/pci/devices/*/modalias) >/dev/null 2>&1 - msg "done." - fi -} @@ -20,22 +20,26 @@ for cmd in $CMDLINE; do case "$cmd" in [0123456Ss]) export runlevel="$cmd" ;; single) export runlevel="S" ;; #some people use 'single' - *.*) ;; #do nothing if it contains a dot - *=*) export "${cmd}" ;; - *) export "${cmd}=y" ;; + # only export stuff that does work with dash :) + *=*) cmd="$(replace "${cmd}" '.' '_')" + cmd="$(replace "${cmd}" '-' '_')" + export "${cmd}" + ;; + *) cmd="$(replace "${cmd}" '.' '_')" + cmd="$(replace "${cmd}" '-' '_')" + export "${cmd}=y" + ;; esac done if [ "x${disablehooks}" != "x" ]; then - k="$(replace -q "${disablehooks}" '-' '_')" - for d in $(replace "${k}" ','); do + for d in $(replace "${disablehooks}" ','); do export "hook_${d}=disabled" done fi if [ "x${disablemodules}" != "x" ]; then - k="$(replace "${disablemodules}" '-' '_')" - for d in $(replace "${k}" ','); do + for d in $(replace "${disablemodules}" ','); do export "mod_${d}=disabled" done fi |