]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - lib/functions
- fix variable type
[rc-scripts.git] / lib / functions
index fa12b3c9e40291e8d325de03d259e64c6efae063..fac4c46e67cfccdca16a3f8369cbc08f803ce7c8 100644 (file)
@@ -166,21 +166,7 @@ strstr() {
 
 # Apply sysctl settings, including files in /etc/sysctl.d
 apply_sysctl() {
-       if [ -x /lib/systemd/systemd-sysctl ]; then
-               /lib/systemd/systemd-sysctl
-               return
-       fi
-
        local file
-       for file in /usr/lib/sysctl.d/*.conf; do
-               [ -f /run/sysctl.d/${file##*/} ] && continue
-               [ -f /etc/sysctl.d/${file##*/} ] && continue
-               test -f "$file" && sysctl -q -e -p "$file"
-       done
-       for file in /run/sysctl.d/*.conf; do
-               [ -f /etc/sysctl.d/${file##*/} ] && continue
-               test -f "$file" && sysctl -q -e -p "$file"
-       done
        for file in /etc/sysctl.d/*.conf; do
                test -f "$file" && sysctl -q -e -p "$file"
        done
@@ -621,7 +607,7 @@ _daemon_set_ulimits() {
 
 # A function to start a program (now it's useful on read-only filesystem too)
 daemon() {
-       local errors="" prog="" end="" waitname="" waittime=""
+       local errors="" prog="" end="" waitname="" waittime=0
        local exit_code=0
        local nice=$SERVICE_RUN_NICE_LEVEL
        local fork user closefds redirfds pidfile makepid chdir=/
@@ -993,6 +979,8 @@ pidofproc() {
                for p in $(< "${pidfile}"); do
                        [ -z "$(echo "$p" | awk '{gsub(/[0-9]/,"");print;}')" ] && pid="$pid $p"
                done
+       else
+               unset pidfile
        fi
 
        # Next try "pidof" if pidfile is not specified
@@ -1323,35 +1311,6 @@ rc_gettext_init() {
        fi
 }
 
-use_upstart () {
-       return 1
-}
-emit () {
-       return 0
-}
-is_upstart_task() {
-       return 1
-}
-is_upstart_running() {
-       return 1
-}
-upstart_start() {
-       return 1
-}
-upstart_stop() {
-       return 1
-}
-upstart_reload() {
-       return 0
-}
-upstart_status() {
-       return 1
-}
-_upstart_controlled() {
-       return 0
-}
-alias upstart_controlled='_upstart_controlled $0 "$@"'
-
 rc_gettext_init
 rc_cache_init