diff options
author | Todd T. Fries <todd@cvs.openbsd.org> | 2008-06-09 22:56:43 +0000 |
---|---|---|
committer | Todd T. Fries <todd@cvs.openbsd.org> | 2008-06-09 22:56:43 +0000 |
commit | 69551d6cbaee812b34f66104da3e902e9bfc4cef (patch) | |
tree | e0a2a94444eae317480e614b1bb6691b446b2966 /etc | |
parent | 78fc5032107923a7eba3087758a6098489e6a5fb (diff) |
warn once not 3 times in case of a non existent file, discussed with deraadt
originally pointed out by Johan Torin
Diffstat (limited to 'etc')
-rw-r--r-- | etc/netstart | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/etc/netstart b/etc/netstart index ea1bcd92705..466de6949de 100644 --- a/etc/netstart +++ b/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.120 2008/06/09 22:46:42 deraadt Exp $ +# $OpenBSD: netstart,v 1.121 2008/06/09 22:56:42 todd Exp $ # Strip comments (and leading/trailing whitespace if IFS is set) # from a file and spew to stdout @@ -36,6 +36,10 @@ ifstart() { fi file=/etc/hostname.$if + if ! [ -f $file ]; then + echo "netstart: $file: No such file or directory" + return + fi if [ "$(stat -f "%SLp %u %g" $file)" != "--- 0 0" ]; then echo "WARNING: $file is insecure, fixing permissions" chmod o-rwx $file |