path: corosync-qdevice_3.0.4-1/init/corosync-qnetd.in # Otherwise simultaneous calls to stop() will loop forever __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" } path: corosync-qdevice_3.0.4-1/init/corosync-qnetd.in __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" } path: corosync-qdevice_3.0.4-1/init/corosync-qnetd.in esac # The version of __pids_pidof in /etc/init.d/functions calls pidof with -x # This means it matches scripts, including this one. # Redefine it here so that status (from the same file) works. path: corosync-qdevice_3.0.4-1/init/corosync-qnetd.in res=$? if [ $res -ne 0 -a -z "$pid_file" ]; then pid=$(__pids_pidof "$1") [ -n "$pid" ] res=$? path: corosync-qdevice_3.0.4-1/init/corosync-qnetd.in # Redefine it here so that status (from the same file) works. # Otherwise simultaneous calls to stop() will loop forever __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" path: corosync-qdevice_3.0.4-1/ChangeLog init: Fix init scripts to work with containers Previously init scripts were not using pid file so pidof was used. This is usually not a problem, but when containers are used it may result to killing improper instance when issued on host. path: corosync-qdevice_3.0.4-1/init/corosync-qdevice.in __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" } path: corosync-qdevice_3.0.4-1/init/corosync-qdevice.in res=$? if [ $res -ne 0 -a -z "$pid_file" ]; then pid=$(__pids_pidof "$1") [ -n "$pid" ] res=$? path: corosync-qdevice_3.0.4-1/init/corosync-qdevice.in # Redefine it here so that status (from the same file) works. # Otherwise simultaneous calls to stop() will loop forever __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" path: corosync-qdevice_3.0.4-1/init/corosync-qdevice.in # Otherwise simultaneous calls to stop() will loop forever __pids_pidof() { pidof -c -o $$ -o $PPID -o %PPID "$1" || \ pidof -c -o $$ -o $PPID -o %PPID "${1##*/}" } path: corosync-qdevice_3.0.4-1/init/corosync-qdevice.in esac # The version of __pids_pidof in /etc/init.d/functions calls pidof with -x # This means it matches scripts, including this one. # Redefine it here so that status (from the same file) works.