Use "grep -qs" over "grep -q" for compatibility (see grep(1))
[live-boot-grml.git] / scripts / live-bottom / 06hostname
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