cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [18/50] [abbrv] git commit: updated refs/heads/ui-restyle to c64bfa5
Date Thu, 20 Feb 2014 19:17:24 GMT
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


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/9dd57c22
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/9dd57c22
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/9dd57c22

Branch: refs/heads/ui-restyle
Commit: 9dd57c22b02afcddb1d6c8ddc3e1b578961454e3
Parents: 9f72443
Author: John Kinsella <jlk@stratosec.co>
Authored: Mon Feb 17 10:00:36 2014 -0800
Committer: John Kinsella <jlk@stratosec.co>
Committed: Mon Feb 17 10:00:36 2014 -0800

----------------------------------------------------------------------
 agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in    | 8 +++-----
 agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in    | 8 +++-----
 agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in  | 8 +++-----
 agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in      | 8 +++-----
 agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in           | 8 +++-----
 packaging/centos63/cloud-agent.rc                            | 8 +++-----
 packaging/centos63/cloud-ipallocator.rc                      | 8 +++-----
 .../centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in       | 8 +++-----
 .../fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in       | 8 +++-----
 .../distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in   | 8 +++-----
 .../distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in  | 8 +++-----
 python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in    | 8 +++-----
 python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in  | 8 +++-----
 .../centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in     | 8 +++-----
 .../fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in     | 8 +++-----
 .../rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in       | 8 +++-----
 .../distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in   | 8 +++-----
 17 files changed, 51 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in b/agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in
index fb82ebf..60e1e04 100755
--- a/agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in
+++ b/agent/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-agent.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in b/agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in
index fb82ebf..60e1e04 100755
--- a/agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in
+++ b/agent/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-agent.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in b/agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in
index ea1c605..2422268 100644
--- a/agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in
+++ b/agent/distro/opensuse/sles/SYSCONFDIR/init.d/cloud-agent.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in b/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
index fb82ebf..60e1e04 100644
--- a/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
+++ b/agent/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-agent.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in
----------------------------------------------------------------------
diff --git a/agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in b/agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in
index ea1c605..2422268 100644
--- a/agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in
+++ b/agent/distro/sles/SYSCONFDIR/init.d/cloud-agent.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/packaging/centos63/cloud-agent.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc
index ab49524..40c358e 100755
--- a/packaging/centos63/cloud-agent.rc
+++ b/packaging/centos63/cloud-agent.rc
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/packaging/centos63/cloud-ipallocator.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-ipallocator.rc b/packaging/centos63/cloud-ipallocator.rc
index 08cf9c8..9a24d8d 100755
--- a/packaging/centos63/cloud-ipallocator.rc
+++ b/packaging/centos63/cloud-ipallocator.rc
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in b/python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
index 6d929c0..b6720f5 100755
--- a/python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
+++ b/python/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in b/python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
index a21070d..aa7e8cf 100755
--- a/python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
+++ b/python/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in b/python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in
index b12e16b..7aa456d 100755
--- a/python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in
+++ b/python/distro/opensuse/SYSCONFDIR/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in b/python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
index a21070d..aa7e8cf 100644
--- a/python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
+++ b/python/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in b/python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in
index b12e16b..7aa456d 100755
--- a/python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in
+++ b/python/distro/sles/SYSCONFDIR/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in
----------------------------------------------------------------------
diff --git a/python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in b/python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in
index 3dcc471..ec84962 100755
--- a/python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in
+++ b/python/distro/ubuntu/SYSCONFDIR/init.d/cloud-ipallocator.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
index 47fdaef..76ee681 100644
--- a/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
+++ b/systemvm/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
index 47fdaef..76ee681 100644
--- a/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
+++ b/systemvm/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in b/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
index 47fdaef..76ee681 100644
--- a/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
+++ b/systemvm/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-console-proxy.in
@@ -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
 

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/9dd57c22/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
----------------------------------------------------------------------
diff --git a/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in b/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
index 550f2fb..c83f00a 100755
--- a/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
+++ b/systemvm/distro/ubuntu/SYSCONFDIR/init.d/cloud-console-proxy.in
@@ -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
 


Mime
View raw message