mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-6129: removing hard-coded script names
Replacing whatami with $0 which is how UNIX shell scripts should get the script's name. BUG-ID: CLOUDSTACK-6129 Bugfix-for: Reviewed-by: Reported-by: Signed-off-by: John Kinsella <jlk@stratosec.co> 1392660036 -0800
This commit is contained in:
parent
9f72443bb1
commit
9dd57c22b0
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -114,7 +112,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -114,7 +112,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/rc.status
|
||||
|
||||
whatami=cloud-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -166,7 +164,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -114,7 +112,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -31,12 +31,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/rc.status
|
||||
|
||||
whatami=cloud-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -166,7 +164,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloudstack-agent
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=/var/run/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=/var/run/"$SHORTNAME".pid
|
||||
LOCKFILE=/var/lock/subsys/"$SHORTNAME"
|
||||
LOGDIR=/var/log/cloudstack/agent
|
||||
LOGFILE=${LOGDIR}/agent.log
|
||||
|
|
@ -112,7 +110,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=/var/run/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=/var/run/"$SHORTNAME".pid
|
||||
LOCKFILE=/var/lock/subsys/"$SHORTNAME"
|
||||
LOGFILE=/var/log/cloudstack/ipallocator/ipallocator.log
|
||||
PROGNAME="External IPAllocator"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@IPALOCATORLOG@
|
||||
PROGNAME="External IPAllocator"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/rc.status
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -110,7 +108,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -23,12 +23,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -30,12 +30,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/rc.status
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -110,7 +108,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
whatami=cloud-external-ipallocator
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@AGENTLOG@
|
||||
PROGNAME="Cloud Agent"
|
||||
|
|
@ -104,7 +102,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-console-proxy
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@CPLOG@
|
||||
PROGNAME="Cloud Console Proxy"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-console-proxy
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@CPLOG@
|
||||
PROGNAME="Cloud Console Proxy"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -24,12 +24,10 @@
|
|||
|
||||
. /etc/rc.d/init.d/functions
|
||||
|
||||
whatami=cloud-console-proxy
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@CPLOG@
|
||||
PROGNAME="Cloud Console Proxy"
|
||||
|
|
@ -90,7 +88,7 @@ case "$1" in
|
|||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|condrestart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
|
|
@ -25,12 +25,10 @@
|
|||
. /lib/lsb/init-functions
|
||||
. /etc/default/rcS
|
||||
|
||||
whatami=cloud-console-proxy
|
||||
|
||||
# set environment variables
|
||||
|
||||
SHORTNAME="$whatami"
|
||||
PIDFILE=@PIDDIR@/"$whatami".pid
|
||||
SHORTNAME="$0"
|
||||
PIDFILE=@PIDDIR@/"$SHORTNAME".pid
|
||||
LOCKFILE=@LOCKDIR@/"$SHORTNAME"
|
||||
LOGFILE=@CPLOG@
|
||||
PROGNAME="Cloud Console Proxy"
|
||||
|
|
@ -104,7 +102,7 @@ case "$1" in
|
|||
start
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $whatami {start|stop|restart|status|help}"
|
||||
echo $"Usage: $SHORTNAME {start|stop|restart|status|help}"
|
||||
RETVAL=3
|
||||
esac
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue