wok diff busybox/stuff/daemon @ rev 22841

Add nwipe (secure disk eraser)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Feb 13 12:20:32 2020 +0100 (2020-02-13)
parents ff5fd8788cd9
children
line diff
     1.1 --- a/busybox/stuff/daemon	Fri May 27 01:40:23 2016 +0300
     1.2 +++ b/busybox/stuff/daemon	Thu Feb 13 12:20:32 2020 +0100
     1.3 @@ -54,7 +54,8 @@
     1.4      fi
     1.5      action 'Starting %s: %s...' "$DESC" $NAME
     1.6      $DAEMON $OPTIONS
     1.7 -    [ -f $PIDFILE ] || pidof $NAME | awk '{print $1}' > $PIDFILE
     1.8 +    [ -f $PIDFILE ] ||
     1.9 +    ps x | sed "/$NAME/!d;/sed/d;/etc\\/init/d" | awk '{ print $1 }' > $PIDFILE
    1.10      active_pidfile $PIDFILE $NAME
    1.11      status
    1.12      ;;
    1.13 @@ -78,7 +79,8 @@
    1.14      kill $(cat $PIDFILE)
    1.15      sleep 2
    1.16      $DAEMON $OPTIONS
    1.17 -    [ -f $PIDFILE ] || pidof $NAME | awk '{print $1}' > $PIDFILE
    1.18 +    [ -f $PIDFILE ] ||
    1.19 +    ps x | sed "/$NAME/!d;/sed/d;/etc\\/init/d" | awk '{ print $1 }' > $PIDFILE
    1.20      active_pidfile $PIDFILE $NAME
    1.21      status
    1.22      ;;