X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;f=lib%2Ffunctions;h=b4c4840aa6dce182ea5b226d74cb07eb01cdb94a;hb=refs%2Fheads%2Fmaster;hp=682102201880e77143688e76525a20b29453c69b;hpb=196499bef27e2a6e7b4f321ed9886f550550044c;p=rc-scripts.git diff --git a/lib/functions b/lib/functions index 6821022..b4c4840 100644 --- a/lib/functions +++ b/lib/functions @@ -119,11 +119,7 @@ strstr() { # Apply sysctl settings, including files in /etc/sysctl.d apply_sysctl() { - local file - for file in /etc/sysctl.d/*.conf; do - test -f "$file" && sysctl -q -e -p "$file" - done - sysctl -q -e -p /etc/sysctl.conf + sysctl -q -e --system } if is_yes "$FASTRC" || is_yes "$IN_SHUTDOWN"; then @@ -900,7 +896,11 @@ killproc() { # Remove pid file if any. if [ "$notset" = "1" ]; then - rm -f /var/run/${base}.pid + if [ -f "${pidfile}" ] ; then + rm -f "$pidfile" + else + rm -f /var/run/${base}.pid + fi fi return $result