only test for run from file if possible, eliminate unnecessary subshell

This commit is contained in:
gh2o 2014-07-20 03:53:43 -07:00
parent 251b9a516e
commit e09bb60159
1 changed files with 3 additions and 3 deletions

View File

@ -24,7 +24,7 @@ run_from_file() {
} }
# do not modify the two lines below # do not modify the two lines below
run_from_file [ -h /dev/fd/0 ] && run_from_file
#!/bin/bash #!/bin/bash
### CONFIGURATION ### CONFIGURATION
@ -246,10 +246,10 @@ postbootstrap_configuration() {
# set up shadow # set up shadow
( (
umask 077 umask 077
( {
grep '^root:' /etc/shadow grep '^root:' /etc/shadow
grep -v '^root:' /archroot/etc/shadow grep -v '^root:' /archroot/etc/shadow
) > /archroot/etc/shadow.new } > /archroot/etc/shadow.new
cat /archroot/etc/shadow.new > /archroot/etc/shadow cat /archroot/etc/shadow.new > /archroot/etc/shadow
rm /archroot/etc/shadow.new rm /archroot/etc/shadow.new
) )