Use "grep -qs" over "grep -q" for compatibility (see grep(1))
authorChris Lamb <lamby@debian.org>
Tue, 30 Sep 2008 23:56:30 +0000 (00:56 +0100)
committerChris Lamb <lamby@debian.org>
Tue, 30 Sep 2008 23:56:30 +0000 (00:56 +0100)
Signed-off-by: Chris Lamb <lamby@debian.org>
scripts/live-bottom/06hostname
scripts/live-bottom/12fstab

index 75ea801..ba71fce 100755 (executable)
@@ -32,7 +32,7 @@ log_begin_msg "Setting hostname"
 # live-initramfs script
 
 # Change hostname only if it is not set
-if [ ! -f /root/etc/hostname ] || grep -q localhost\.localdomain /root/etc/hostname
+if [ ! -f /root/etc/hostname ] || grep -qs localhost\.localdomain /root/etc/hostname
 then
        echo "${HOSTNAME}" > /root/etc/hostname
 else
index 2dba37a..f38eee7 100755 (executable)
@@ -33,7 +33,7 @@ log_begin_msg "Configuring fstab"
 # live-initramfs script
 
 # Create a fake fstab only if it is not already there
-if [ ! -f "${FSTAB}" ] || grep -q 'UNCONFIGURED FSTAB FOR BASE SYSTEM' "${FSTAB}"
+if [ ! -f "${FSTAB}" ] || grep -qs 'UNCONFIGURED FSTAB FOR BASE SYSTEM' "${FSTAB}"
 then
        cat >> ${FSTAB} << EOF
 # /etc/fstab: static file system information.