]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- tab-safe is_empty_file() now (from rc.modules)
authorElan Ruusamäe <glen@pld-linux.org>
Mon, 26 Nov 2007 20:05:34 +0000 (20:05 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Mon, 26 Nov 2007 20:05:34 +0000 (20:05 +0000)
svn-id: @9097

rc.d/init.d/functions

index 24b24ea08c22eb7e1b92a91fa7c026c92b107f65..2306850cb84fe4511c3486fa1f398f3457a5f575 100644 (file)
@@ -108,7 +108,7 @@ is_no()
 # empty lines and lines beginning with hash are ignored
 is_empty_file() {
        [ -s "$1" ] || return 0
-       egrep -vq '^(#| *$)' "$1" && return 1 || return 0
+       egrep -vq "^(#|[[:blank:]]*$)" "$1" && return 1 || return 0
 }
 
 # returns OK if $1 contains $2
This page took 0.046251 seconds and 4 git commands to generate.