From: Thorsten Gunkel (tgunkel-lists_at_tgunkel.de)
Date: Mon 20 Dec 2004 - 21:40:16 GMT
OK, what do you think about the following patch?
#v+
--- util-vserver-0.30.196/scripts/vserver 2004-08-27 23:06:45.000000000 +0200
+++ /sbin/vserver 2004-12-20 20:46:26.000000000 +0100
@@ -184,6 +184,16 @@
exit 5
} >&2
+# check for missing linebreak
+find "$VSERVER_DIR" -type f -print | while read line
+do
+ if [ 0 -eq `tail -n1 "$line" | wc -l` ]; then
+ echo "Warning: One of your config-files has no final newline or is empty. This *will* cause trouble" >&2
+ echo "Stop this process now and change $line" 2>&1
+ sleep 8
+ fi
+done
+
if test -e "$VSERVER_DIR"/name; then
read VSERVER_NAME <"$VSERVER_DIR"/name
else
v#-
_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver