aboutsummaryrefslogtreecommitdiffstats
path: root/etc/rc.d
diff options
context:
space:
mode:
authorJan Macku <jamacku@redhat.com>2020-11-06 08:02:11 +0100
committerGitHub <noreply@github.com>2020-11-06 08:02:11 +0100
commitebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0 (patch)
treeddf520892971b7179cea62f4436b4d93b96995d6 /etc/rc.d
parent7d876f7ac28151d754aafbe5d008c9a4b574e211 (diff)
downloadinitscripts-ebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0.tar
initscripts-ebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0.tar.gz
initscripts-ebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0.tar.bz2
initscripts-ebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0.tar.xz
initscripts-ebad1346df3ff9d32cbf2dc9b02d20e1d734f1e0.zip
init.d/functions: Make usage msgs more clear
Diffstat (limited to 'etc/rc.d')
-rw-r--r--etc/rc.d/init.d/functions12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/rc.d/init.d/functions b/etc/rc.d/init.d/functions
index 0c2bda66..5ede6c76 100644
--- a/etc/rc.d/init.d/functions
+++ b/etc/rc.d/init.d/functions
@@ -311,7 +311,7 @@ killproc() {
RC=0; delay=3; try=0
# Test syntax.
if [ "$#" -eq 0 ]; then
- echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
+ echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
return 1
fi
if [ "$1" = "-p" ]; then
@@ -321,7 +321,7 @@ killproc() {
if [ "$1" = "-b" ]; then
if [ -z $pid_file ]; then
echo $"-b option can be used only with -p"
- echo $"Usage: killproc -p pidfile -b binary program"
+ echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
return 1
fi
binary=$2
@@ -330,7 +330,7 @@ killproc() {
if [ "$1" = "-d" ]; then
delay=$(echo $2 | awk -v RS=' ' -v IGNORECASE=1 '{if($1!~/^[0-9.]+[smhd]?$/) exit 1;d=$1~/s$|^[0-9.]*$/?1:$1~/m$/?60:$1~/h$/?60*60:$1~/d$/?24*60*60:-1;if(d==-1) exit 1;delay+=d*$1} END {printf("%d",delay+0.5)}')
if [ "$?" -eq 1 ]; then
- echo $"Usage: killproc [-p pidfile] [ -d delay] {program} [-signal]"
+ echo $"Usage: killproc [-p {pidfile} [-b {binary}]] [-d {delay}] {program} [-signal]"
return 1
fi
shift 2
@@ -408,7 +408,7 @@ pidofproc() {
# Test syntax.
if [ "$#" = 0 ]; then
- echo $"Usage: pidofproc [-p pidfile] {program}"
+ echo $"Usage: pidofproc [-p {pidfile}] {program}"
return 1
fi
if [ "$1" = "-p" ]; then
@@ -434,7 +434,7 @@ status() {
# Test syntax.
if [ "$#" = 0 ] ; then
- echo $"Usage: status [-p pidfile] {program}"
+ echo $"Usage: status [-p {pidfile}] [-l {lockfile}] [-b {binary}] {program}"
return 1
fi
if [ "$1" = "-p" ]; then
@@ -448,7 +448,7 @@ status() {
if [ "$1" = "-b" ]; then
if [ -z $pid_file ]; then
echo $"-b option can be used only with -p"
- echo $"Usage: status -p pidfile -b binary program"
+ echo $"Usage: status [-p {pidfile}] [-l {lockfile}] [-b {binary}] {program}"
return 1
fi
binary=$2