Signed-off-by: Chris Lamb <lamby@debian.org>
# 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
# 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.