Keep Linux Standard Base compatibility on non-SuSE platform

This commit is contained in:
Akihiro Uchida 2014-09-10 23:56:27 +09:00
parent 84485d8f85
commit 03e40817b0
2 changed files with 20 additions and 10 deletions

View File

@ -42,11 +42,16 @@ then
. /etc/rc.status . /etc/rc.status
rc_reset rc_reset
else else
# Define rc functions for non-suse systems, "void" functions. # Define part of rc functions for non-suse systems
function rc_status () { VOID=1; } function rc_status () {
function rc_exit () { exit; } RETVAL=$?
function rc_failed () { VOID=1; } case $1 in
-v) RETVAL=0;;
esac
}
function rc_exit () { exit $RETVAL; }
function rc_failed () { RETVAL=${1:-1}; }
RETVAL=0
fi fi
# This function replace pidof, not working in the same way in different linux distros # This function replace pidof, not working in the same way in different linux distros

View File

@ -30,11 +30,16 @@ then
. /etc/rc.status . /etc/rc.status
rc_reset rc_reset
else else
# Define rc functions for non-suse systems, "void" functions. # Define part of rc functions for non-suse systems
function rc_status () { VOID=1; } function rc_status () {
function rc_exit () { exit; } RETVAL=$?
function rc_failed () { VOID=1; } case $1 in
-v) RETVAL=0;;
esac
}
function rc_exit () { exit $RETVAL; }
function rc_failed () { RETVAL=${1:-1}; }
RETVAL=0
fi fi
function get_pid { function get_pid {