diff options
author | Jörg Thalheim <joerg@thalheim.io> | 2017-04-05 00:34:54 +0200 |
---|---|---|
committer | Jörg Thalheim <joerg@thalheim.io> | 2017-04-05 21:40:57 +0200 |
commit | 62c79a1de8e5e65ead62816b7760e12a6804d44b (patch) | |
tree | a6641e556e776dd1479817c16ba4eefb38952164 /nixos | |
parent | e3f031b200dfb92ecefa73e02878b724194a1d8b (diff) | |
download | nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar.gz nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar.bz2 nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar.lz nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar.xz nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.tar.zst nixlib-62c79a1de8e5e65ead62816b7760e12a6804d44b.zip |
stage-2: shellsheck recommendations
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/system/boot/stage-2-init.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index 2b89c888ac8f..46aed44bf10f 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -6,7 +6,7 @@ export HOME=/root PATH="@path@" # Process the kernel command line. -for o in $(cat /proc/cmdline); do +for o in $(</proc/cmdline); do case $o in boot.debugtrace) # Show each command. @@ -107,8 +107,8 @@ fi # Use /etc/resolv.conf supplied by systemd-nspawn, if applicable. -if [ -n "@useHostResolvConf@" -a -e /etc/resolv.conf ]; then - cat /etc/resolv.conf | resolvconf -m 1000 -a host +if [ -n "@useHostResolvConf@" ] && [ -e /etc/resolv.conf ]; then + resolvconf -m 1000 -a host </etc/resolv.conf fi # Log the script output to /dev/kmsg or /run/log/stage-2-init.log. |