Modify init-scripts to be able to run both on RHEL and Debian.
This commit is contained in:
2
setup.py
2
setup.py
@@ -42,7 +42,7 @@ INITSYS_FILES = {
|
|||||||
'upstart': [f for f in glob('upstart/*') if is_f(f)],
|
'upstart': [f for f in glob('upstart/*') if is_f(f)],
|
||||||
}
|
}
|
||||||
INITSYS_ROOTS = {
|
INITSYS_ROOTS = {
|
||||||
'sysvinit': '/etc/rc.d/init.d',
|
'sysvinit': '/etc/init.d',
|
||||||
'systemd': '/etc/systemd/system/',
|
'systemd': '/etc/systemd/system/',
|
||||||
'upstart': '/etc/init/',
|
'upstart': '/etc/init/',
|
||||||
}
|
}
|
||||||
|
@@ -29,15 +29,13 @@
|
|||||||
# Should-Start: $time
|
# Should-Start: $time
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
# Default-Start: 3 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop:
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: The config cloud-init job
|
# Short-Description: The config cloud-init job
|
||||||
# Description: Start cloud-init and runs the config phase
|
# Description: Start cloud-init and runs the config phase
|
||||||
# and any associated config modules as desired.
|
# and any associated config modules as desired.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
# Return values acc. to LSB for all commands but status:
|
# Return values acc. to LSB for all commands but status:
|
||||||
# 0 - success
|
# 0 - success
|
||||||
# 1 - generic or unspecified error
|
# 1 - generic or unspecified error
|
||||||
@@ -60,8 +58,9 @@ prog="cloud-init"
|
|||||||
cloud_init="/usr/bin/cloud-init"
|
cloud_init="/usr/bin/cloud-init"
|
||||||
conf="/etc/cloud/cloud.cfg"
|
conf="/etc/cloud/cloud.cfg"
|
||||||
|
|
||||||
# If there exists a sysconfig variable override file use it...
|
# If there exist sysconfig/default variable override files use it...
|
||||||
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
||||||
|
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -x $cloud_init ] || return 5
|
[ -x $cloud_init ] || return 5
|
||||||
@@ -80,8 +79,6 @@ stop() {
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
|
@@ -29,15 +29,13 @@
|
|||||||
# Should-Start: $time
|
# Should-Start: $time
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
# Default-Start: 3 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop:
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: The final cloud-init job
|
# Short-Description: The final cloud-init job
|
||||||
# Description: Start cloud-init and runs the final phase
|
# Description: Start cloud-init and runs the final phase
|
||||||
# and any associated final modules as desired.
|
# and any associated final modules as desired.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
# Return values acc. to LSB for all commands but status:
|
# Return values acc. to LSB for all commands but status:
|
||||||
# 0 - success
|
# 0 - success
|
||||||
# 1 - generic or unspecified error
|
# 1 - generic or unspecified error
|
||||||
@@ -60,8 +58,9 @@ prog="cloud-init"
|
|||||||
cloud_init="/usr/bin/cloud-init"
|
cloud_init="/usr/bin/cloud-init"
|
||||||
conf="/etc/cloud/cloud.cfg"
|
conf="/etc/cloud/cloud.cfg"
|
||||||
|
|
||||||
# If there exists a sysconfig variable override file use it...
|
# If there exist sysconfig/default variable override files use it...
|
||||||
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
||||||
|
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -x $cloud_init ] || return 5
|
[ -x $cloud_init ] || return 5
|
||||||
@@ -80,8 +79,6 @@ stop() {
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
|
@@ -29,15 +29,13 @@
|
|||||||
# Should-Start: $time
|
# Should-Start: $time
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
# Default-Start: 3 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop:
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: The initial cloud-init job (net and fs contingent)
|
# Short-Description: The initial cloud-init job (net and fs contingent)
|
||||||
# Description: Start cloud-init and runs the initialization phase
|
# Description: Start cloud-init and runs the initialization phase
|
||||||
# and any associated initial modules as desired.
|
# and any associated initial modules as desired.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
# Return values acc. to LSB for all commands but status:
|
# Return values acc. to LSB for all commands but status:
|
||||||
# 0 - success
|
# 0 - success
|
||||||
# 1 - generic or unspecified error
|
# 1 - generic or unspecified error
|
||||||
@@ -60,8 +58,9 @@ prog="cloud-init"
|
|||||||
cloud_init="/usr/bin/cloud-init"
|
cloud_init="/usr/bin/cloud-init"
|
||||||
conf="/etc/cloud/cloud.cfg"
|
conf="/etc/cloud/cloud.cfg"
|
||||||
|
|
||||||
# If there exists a sysconfig variable override file use it...
|
# If there exist sysconfig/default variable override files use it...
|
||||||
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
||||||
|
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -x $cloud_init ] || return 5
|
[ -x $cloud_init ] || return 5
|
||||||
@@ -80,8 +79,6 @@ stop() {
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
|
@@ -29,15 +29,13 @@
|
|||||||
# Should-Start: $time
|
# Should-Start: $time
|
||||||
# Required-Stop:
|
# Required-Stop:
|
||||||
# Should-Stop:
|
# Should-Stop:
|
||||||
# Default-Start: 3 5
|
# Default-Start: 2 3 4 5
|
||||||
# Default-Stop:
|
# Default-Stop: 0 1 6
|
||||||
# Short-Description: The initial cloud-init job (local fs contingent)
|
# Short-Description: The initial cloud-init job (local fs contingent)
|
||||||
# Description: Start cloud-init and runs the initialization phases
|
# Description: Start cloud-init and runs the initialization phases
|
||||||
# and any associated initial modules as desired.
|
# and any associated initial modules as desired.
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
# Return values acc. to LSB for all commands but status:
|
# Return values acc. to LSB for all commands but status:
|
||||||
# 0 - success
|
# 0 - success
|
||||||
# 1 - generic or unspecified error
|
# 1 - generic or unspecified error
|
||||||
@@ -60,8 +58,9 @@ prog="cloud-init"
|
|||||||
cloud_init="/usr/bin/cloud-init"
|
cloud_init="/usr/bin/cloud-init"
|
||||||
conf="/etc/cloud/cloud.cfg"
|
conf="/etc/cloud/cloud.cfg"
|
||||||
|
|
||||||
# If there exists a sysconfig variable override file use it...
|
# If there exist sysconfig/default variable override files use it...
|
||||||
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init
|
||||||
|
[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
[ -x $cloud_init ] || return 5
|
[ -x $cloud_init ] || return 5
|
||||||
@@ -80,8 +79,6 @@ stop() {
|
|||||||
return $RETVAL
|
return $RETVAL
|
||||||
}
|
}
|
||||||
|
|
||||||
. /etc/init.d/functions
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
|
Reference in New Issue
Block a user