diff options
author | Dave Reisner <d@falconindy.com> | 2011-06-09 04:39:33 +0200 |
---|---|---|
committer | Thomas Bächler <thomas@archlinux.org> | 2011-06-25 12:25:45 +0200 |
commit | 199eea97bad60365dcfd5bac7ea55fc39b2f773a (patch) | |
tree | 9ac73bb2a00448fbab713e561277767485cd1058 /init | |
parent | 81e77426e554a61d85e1738af604359171a6062e (diff) | |
download | mkinitcpio-199eea97bad60365dcfd5bac7ea55fc39b2f773a.tar.gz mkinitcpio-199eea97bad60365dcfd5bac7ea55fc39b2f773a.tar.xz |
init: remove unnecessary variable declarations
These don't really serve a purpose and might actually munge a test for
an unset var. Declare vars as we need them, substituing with default
expansions where possible.
Signed-off-by: Dave Reisner <d@falconindy.com>
Diffstat (limited to 'init')
-rw-r--r-- | init | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -24,13 +24,8 @@ else fi mount -t tmpfs run /run -o nosuid,noexec,nodev,mode=755,size=10M -root="" -init="" echo "/sbin/modprobe" > /proc/sys/kernel/modprobe -# set default mount handler -mount_handler="default_mount_handler" - # parse the kernel command line parse_cmdline @@ -84,9 +79,9 @@ if [ "${break}" = "y" ]; then fi # Mount root at /new_root -${mount_handler} /new_root +${mount_handler:-default_mount_handler} /new_root -[ -z "${init}" ] && init="/sbin/init" +init=${init:-/sbin/init} if [ "$(stat -c %D /)" = "$(stat -c %D /new_root)" ]; then # Nothing got mounted on /new_root. This is the end, we don't know what to do anymore # We fall back into a shell, but the shell has now PID 1 |