Improved grep in init scripts
This commit is contained in:
parent
9b3a2e4d07
commit
5a31f0399f
@ -33,6 +33,9 @@ v0.91.9 16-May-2007
|
|||||||
mbuseradd:
|
mbuseradd:
|
||||||
Added check for FreeBSD > 6.0 and use sysctl for security check.
|
Added check for FreeBSD > 6.0 and use sysctl for security check.
|
||||||
|
|
||||||
|
script:
|
||||||
|
Improved grep in init scripts.
|
||||||
|
|
||||||
|
|
||||||
v0.91.8 26-Apr-2007 - 16-May-2007
|
v0.91.8 26-Apr-2007 - 16-May-2007
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
# For Debian SYSV init style.
|
# For Debian SYSV init style.
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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
|
if [ "$MBSE_ROOT" = "" ]; then
|
||||||
echo "MBSE BBS: No 'mbse' user in the password file."
|
echo "MBSE BBS: No 'mbse' user in the password file."
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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
|
if [ "${MBSE_ROOT}" = "" ]; then
|
||||||
echo "MBSE BBS: No 'mbse' user in the password file."
|
echo "MBSE BBS: No 'mbse' user in the password file."
|
||||||
|
@ -23,7 +23,7 @@ mbsebbs_start()
|
|||||||
echo -n "Starting mbsebbs:"
|
echo -n "Starting mbsebbs:"
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
echo -n "Starting mbsebbs:"
|
echo -n "Starting mbsebbs:"
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
[ ${NETWORKING} = "no" ] && exit 1
|
[ ${NETWORKING} = "no" ] && exit 1
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
# Find the MBSE_ROOT from the /etc/passwd file.
|
# 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}" = "" ]
|
if [ "${MBSE_ROOT}" = "" ]
|
||||||
then
|
then
|
||||||
|
Reference in New Issue
Block a user