mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Debian: check if the service is going to be started at any runlevel,
fixes bootstrap in container (Docker, LXC)
This commit is contained in:
parent
ce3b96b14a
commit
0474f4399d
1 changed files with 2 additions and 2 deletions
|
@ -1889,8 +1889,8 @@ __check_services_debian() {
|
|||
servicename=$1
|
||||
echodebug "Checking if service ${servicename} is enabled"
|
||||
|
||||
# shellcheck disable=SC2086,SC2046,SC2144
|
||||
if [ -f /etc/rc$(runlevel | awk '{ print $2 }').d/S*${servicename} ]; then
|
||||
# Check if the service is going to be started at any runlevel, fixes bootstrap in container (Docker, LXC)
|
||||
if ls /etc/rc?.d/S*"${servicename}" >/dev/null 2>&1; then
|
||||
echodebug "Service ${servicename} is enabled"
|
||||
return 0
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue