Use "test -s" instead of testing file availability and size.
authorChris Lamb <lamby@debian.org>
Tue, 30 Sep 2008 23:56:55 +0000 (00:56 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:48:02 +0000 (17:48 +0100)
scripts/live-bottom/06hostname

index ba71fce..b14703a 100755 (executable)
@@ -41,7 +41,7 @@ else
 fi
 
 # Create /etc/hosts only if it is not present or empty
-if [ ! -f /root/etc/hosts ] || [ "$(/root/usr/bin/stat -c %s root/etc/hosts)" == "0" ]
+if [ ! -s /root/etc/hosts ]
 then
        cat > /root/etc/hosts << EOF
 127.0.0.1 localhost