summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Hadaway <raker@gentoo.org>2002-08-14 21:03:39 +0000
committerNick Hadaway <raker@gentoo.org>2002-08-14 21:03:39 +0000
commit6c4d9896d5d9b30409b0743f4ae8558ca0331967 (patch)
treef75a97b2df814dadab32cf4699cf1049b0deaf76 /net-fs/autofs
parentAdded rblcheck to portage. Thanks to Enrico Morelli for the initial (diff)
downloadgentoo-2-6c4d9896d5d9b30409b0743f4ae8558ca0331967.tar.gz
gentoo-2-6c4d9896d5d9b30409b0743f4ae8558ca0331967.tar.bz2
gentoo-2-6c4d9896d5d9b30409b0743f4ae8558ca0331967.zip
Updated sed statement from "sed -e '/^#/d' -e '/^$/d'" to "sed -e '/^
*[^# ]/!d'" which appears to be a cleaner way of removing comments and blank lines. Thanks to Andr� Luiz Pfitzner for the suggestion.
Diffstat (limited to 'net-fs/autofs')
-rwxr-xr-xnet-fs/autofs/files/autofs4
-rw-r--r--net-fs/autofs/files/autofs.rc64
2 files changed, 4 insertions, 4 deletions
diff --git a/net-fs/autofs/files/autofs b/net-fs/autofs/files/autofs
index ebc7e19fea78..6b3911d023e0 100755
--- a/net-fs/autofs/files/autofs
+++ b/net-fs/autofs/files/autofs
@@ -1,6 +1,6 @@
#!/sbin/runscript
#RCUPDATE:3 4:75:
-# $Id: autofs,v 1.2 2002/04/11 13:31:08 seemant Exp $
+# $Id: autofs,v 1.3 2002/08/14 21:03:39 raker Exp $
#
# rc file for automount using a Sun-style "master map".
# We first look for a local /etc/auto.master, then a YP
@@ -40,7 +40,7 @@ function getmounts()
#
if [ -f /etc/autofs/auto.master ]
then
- cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'| (
+ cat /etc/autofs/auto.master | sed -e '/^ *[^#]/!d' | (
while read dir map options
do
if [ ! -z "$dir" -a ! -z "$map" \
diff --git a/net-fs/autofs/files/autofs.rc6 b/net-fs/autofs/files/autofs.rc6
index 01c4c7622632..f1d2742a470f 100644
--- a/net-fs/autofs/files/autofs.rc6
+++ b/net-fs/autofs/files/autofs.rc6
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs.rc6,v 1.4 2002/07/17 03:11:56 lamer Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-fs/autofs/files/autofs.rc6,v 1.5 2002/08/14 21:03:39 raker Exp $
# rc file for automount using a Sun-style "master map".
# We first look for a local /etc/auto.master, then a YP
@@ -25,7 +25,7 @@ getmounts() {
#
if [ -f /etc/autofs/auto.master ]
then
- cat /etc/autofs/auto.master | sed -e '/^#/d' -e '/^$/d'| (
+ cat /etc/autofs/auto.master | sed -e '/^ *[^# ]/!d'| (
while read dir map options
do
if [ ! -z "$dir" -a ! -z "$map" \