Improved grep in init scripts

This commit is contained in:
Michiel Broek
2007-07-09 18:46:51 +00:00
parent 9b3a2e4d07
commit 5a31f0399f
9 changed files with 11 additions and 8 deletions

View File

@@ -8,7 +8,7 @@
# For Debian SYSV init style.
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "$MBSE_ROOT" = "" ]; then
echo "MBSE BBS: No 'mbse' user in the password file."

View File

@@ -8,7 +8,7 @@
#
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then

View File

@@ -8,7 +8,7 @@
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]; then
echo "MBSE BBS: No 'mbse' user in the password file."

View File

@@ -23,7 +23,7 @@ mbsebbs_start()
echo -n "Starting mbsebbs:"
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then

View File

@@ -7,7 +7,7 @@
echo -n "Starting mbsebbs:"
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then

View File

@@ -16,7 +16,7 @@
[ ${NETWORKING} = "no" ] && exit 1
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then

View File

@@ -8,7 +8,7 @@
#
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then

View File

@@ -12,7 +12,7 @@
### END INIT INFO
# Find the MBSE_ROOT from the /etc/passwd file.
MBSE_ROOT=`cat /etc/passwd | grep mbse: | awk -F ':' '{ print $6}'`
MBSE_ROOT=`cat /etc/passwd | grep ^mbse: | awk -F ':' '{ print $6}'`
if [ "${MBSE_ROOT}" = "" ]
then