only test for run from file if possible, eliminate unnecessary subshell
This commit is contained in:
parent
251b9a516e
commit
e09bb60159
|
@ -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
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue