[ovs-dev] [PATCH] debian: Correct naming in init scripts
Justin Pettit
jpettit at nicira.com
Mon Jun 28 21:21:48 UTC 2010
Thanks. Pushed.
--Justin
On Jun 28, 2010, at 2:19 PM, Ben Pfaff wrote:
> Looks good.
>
> On Mon, Jun 28, 2010 at 02:13:49PM -0700, Justin Pettit wrote:
>> Whoops. This was the intended description that was meant to go with that commit:
>>
>> A number of the init scripts assumed that the package name
>> was the same as the binary, which is not always true. This
>> fixes those issues as well as some incorrect names in usage
>> messages.
>>
>> --Justin
>>
>>
>> On Jun 28, 2010, at 2:11 PM, Justin Pettit wrote:
>>
>>> Reported-by: Ram Jothikumar <rjothikumar at nicira.com>
>>> ---
>>> debian/corekeeper.init | 2 +-
>>> debian/openvswitch-controller.init | 4 ++--
>>> debian/openvswitch-monitor.init | 9 +++++----
>>> debian/openvswitch-switch.init | 2 +-
>>> 4 files changed, 9 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/debian/corekeeper.init b/debian/corekeeper.init
>>> index b116f68..b544568 100755
>>> --- a/debian/corekeeper.init
>>> +++ b/debian/corekeeper.init
>>> @@ -57,7 +57,7 @@ case "$1" in
>>> exit 0
>>> ;;
>>> *)
>>> - N=/etc/init.d/$NAME
>>> + N=/etc/init.d/corekeeper
>>> echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
>>> exit 1
>>> ;;
>>> diff --git a/debian/openvswitch-controller.init b/debian/openvswitch-controller.init
>>> index cf01fcf..d489869 100755
>>> --- a/debian/openvswitch-controller.init
>>> +++ b/debian/openvswitch-controller.init
>>> @@ -42,7 +42,7 @@ test -x $DAEMON || exit 0
>>> . /lib/lsb/init-functions
>>>
>>> # Default options, these can be overriden by the information
>>> -# at /etc/default/$NAME
>>> +# at /etc/default/openvswitch-controller
>>> DAEMON_OPTS="" # Additional options given to the server
>>>
>>> DODTIME=10 # Time to wait for the server to die, in seconds
>>> @@ -260,7 +260,7 @@ case "$1" in
>>> log_warning_msg "cannot re-read the config file (use restart)."
>>> ;;
>>> *)
>>> - N=/etc/init.d/$NAME
>>> + N=/etc/init.d/openvswitch-controller
>>> echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2
>>> exit 1
>>> ;;
>>> diff --git a/debian/openvswitch-monitor.init b/debian/openvswitch-monitor.init
>>> index 6f2c048..62c0ac8 100755
>>> --- a/debian/openvswitch-monitor.init
>>> +++ b/debian/openvswitch-monitor.init
>>> @@ -46,7 +46,7 @@ test -x $DAEMON || exit 0
>>> . /lib/lsb/init-functions
>>>
>>> # Default options, these can be overriden by the information
>>> -# at /etc/default/$NAME
>>> +# at /etc/default/openvswitch-monitor
>>> DAEMON_OPTS="" # Additional options given to the daemon
>>>
>>> DODTIME=10 # Time to wait for the daemon to die, in seconds
>>> @@ -55,8 +55,9 @@ DODTIME=10 # Time to wait for the daemon to die, in seconds
>>> # 'restart' will not work
>>>
>>> # Include defaults if available
>>> -if [ -f /etc/default/$NAME ] ; then
>>> - . /etc/default/$NAME
>>> +default=/etc/default/openvswitch-monitor
>>> +if [ -f $default ] ; then
>>> + . $default
>>> fi
>>>
>>> set -e
>>> @@ -165,7 +166,7 @@ case "$1" in
>>> log_warning_msg "cannot re-read the config file (use restart)."
>>> ;;
>>> *)
>>> - N=/etc/init.d/$NAME
>>> + N=/etc/init.d/openvswitch-monitor
>>> echo "Usage: $N {start|stop|restart|force-reload|status}" >&2
>>> exit 1
>>> ;;
>>> diff --git a/debian/openvswitch-switch.init b/debian/openvswitch-switch.init
>>> index ef92340..a5b6857 100755
>>> --- a/debian/openvswitch-switch.init
>>> +++ b/debian/openvswitch-switch.init
>>> @@ -327,7 +327,7 @@ case "$1" in
>>> done
>>> ;;
>>> *)
>>> - N=/etc/init.d/$NAME
>>> + N=/etc/init.d/openvswitch-switch
>>> echo "Usage: $N {start|stop|restart|force-reload|status|force-stop|unload}" >&2
>>> exit 1
>>> ;;
>>> --
>>> 1.7.1
>>>
>>>
>>> _______________________________________________
>>> dev mailing list
>>> dev at openvswitch.org
>>> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
>>
>>
>> _______________________________________________
>> dev mailing list
>> dev at openvswitch.org
>> http://openvswitch.org/mailman/listinfo/dev_openvswitch.org
More information about the dev
mailing list