rename reload from plc.d/functions into plc_reload
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 12:51:37 +0000 (14:51 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Tue, 27 Mar 2012 12:51:37 +0000 (14:51 +0200)
to avoid confusion with builtin /sbin/reload

plc.d/functions
plc.init

index b5811c7..3ca315b 100644 (file)
@@ -99,7 +99,7 @@ function upper () {
 }
 
 # Regenerate configuration files
-function reload () {
+function plc_reload () {
     force=$1
 
     # Regenerate the main configuration file from default values
index c98b0c1..c3ae8f4 100755 (executable)
--- a/plc.init
+++ b/plc.init
@@ -8,6 +8,7 @@
 #
 
 # Source function library and configuration
+# plc_reload is defined here
 . /etc/plc.d/functions
 
 # Verbosity
@@ -100,7 +101,7 @@ command=$1
 shift 1
 if [ -z "$1" ] ; then
     # Start or stop everything. Regenerate configuration first.
-    reload force
+    plc_reload force
 else
     # Start or stop a particular step
     steps=("$@")
@@ -115,7 +116,7 @@ start ()
        if [ -x /etc/plc.d/$step ] ; then
            /etc/plc.d/$step start
            # Steps may alter the configuration, may need to regenerate
-           reload
+           plc_reload
        else
            echo "PLC: $step: unrecognized step" >&4
            exit 1
@@ -130,7 +131,7 @@ stop ()
        if [ -x /etc/plc.d/$step ] ; then
            /etc/plc.d/$step stop
            # Steps may alter the configuration, may need to regenerate
-           reload
+           plc_reload
        else
            echo "PLC: $step: unrecognized step" >&4
            exit 1
@@ -149,7 +150,7 @@ case "$command" in
        ;;
 
     reload)
-       reload force
+       plc_reload force
        ;;
 
     checkpoint)