diff options
author | Roger Qiu <roger.qiu@polycademy.com> | 2016-02-24 18:54:25 +1100 |
---|---|---|
committer | Roger Qiu <roger.qiu@polycademy.com> | 2016-02-24 18:54:25 +1100 |
commit | 5cf823e1f48296b666eaa116dd153bd2fd10184c (patch) | |
tree | 62fa5a84f344993791664075938f84d13953a290 /nixos/modules/system/boot/stage-2-init.sh | |
parent | 3ef63227dd580d97cd6052bb03ec05a878fd6e93 (diff) | |
download | nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar.gz nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar.bz2 nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar.lz nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar.xz nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.tar.zst nixpkgs-5cf823e1f48296b666eaa116dd153bd2fd10184c.zip |
nixos/stage-1/2: Added -r option to read so that read interprets backslashes literally, and corrected the comment about optional logging.
Diffstat (limited to 'nixos/modules/system/boot/stage-2-init.sh')
-rw-r--r-- | nixos/modules/system/boot/stage-2-init.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/stage-2-init.sh b/nixos/modules/system/boot/stage-2-init.sh index 9b34d24bdbc..1b5b22c2005 100644 --- a/nixos/modules/system/boot/stage-2-init.sh +++ b/nixos/modules/system/boot/stage-2-init.sh @@ -155,11 +155,11 @@ mkdir -m 0755 -p /var/setuid-wrappers mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers -# Optionally log the script output to /dev/kmsg or /run/log/stage-2-init.log. +# Log the script output to /dev/kmsg or /run/log/stage-2-init.log. # Only at this point are all the necessary prerequisites ready for these commands. exec {logOutFd}>&1 {logErrFd}>&2 if test -w /dev/kmsg; then - exec > >(tee -i /proc/self/fd/"$logOutFd" | while read line; do + exec > >(tee -i /proc/self/fd/"$logOutFd" | while read -r line; do if test -n "$line"; then echo "<7>stage-2-init: $line" > /dev/kmsg fi |