mirror of
https://github.com/saltstack/salt-bootstrap.git
synced 2025-04-16 09:40:21 +00:00
Reduce some unnecessary output in Arch post install functions.
This commit is contained in:
parent
fdfc7a514c
commit
a12af383c3
1 changed files with 10 additions and 8 deletions
|
@ -923,13 +923,14 @@ install_arch_post() {
|
|||
|
||||
if [ -f /usr/bin/systemctl ]; then
|
||||
# Using systemd
|
||||
/usr/bin/systemctl is-enabled salt-$fname.service || (
|
||||
/usr/bin/systemctl preset salt-$fname.service && /usr/bin/systemctl enable salt-$fname.service
|
||||
/usr/bin/systemctl is-enabled salt-$fname.service /dev/null 2>&1 || (
|
||||
/usr/bin/systemctl preset salt-$fname.service /dev/null 2>&1 &&
|
||||
/usr/bin/systemctl enable salt-$fname.service /dev/null 2>&1
|
||||
)
|
||||
sleep 0.1
|
||||
systemctl daemon-reload
|
||||
/usr/bin/systemctl daemon-reload
|
||||
sleep 0.1
|
||||
systemctl try-restart salt-$fname.service
|
||||
/usr/bin/systemctl try-restart salt-$fname.service
|
||||
continue
|
||||
fi
|
||||
/etc/rc.d/salt-$fname start
|
||||
|
@ -947,13 +948,14 @@ install_arch_git_post() {
|
|||
if [ -f /usr/bin/systemctl ]; then
|
||||
cp ${SALT_GIT_CHECKOUT_DIR}/pkg/rpm/salt-$fname.service /lib/systemd/system/salt-$fname.service
|
||||
|
||||
/usr/bin/systemctl is-enabled salt-$fname.service || (
|
||||
/usr/bin/systemctl preset salt-$fname.service && /usr/bin/systemctl enable salt-$fname.service
|
||||
/usr/bin/systemctl is-enabled salt-$fname.service /dev/null 2>&1 || (
|
||||
/usr/bin/systemctl preset salt-$fname.service /dev/null 2>&1 &&
|
||||
/usr/bin/systemctl enable salt-$fname.service /dev/null 2>&1
|
||||
)
|
||||
sleep 0.1
|
||||
systemctl daemon-reload
|
||||
/usr/bin/systemctl daemon-reload
|
||||
sleep 0.1
|
||||
systemctl try-restart salt-$fname.service
|
||||
/usr/bin/systemctl try-restart salt-$fname.service
|
||||
continue
|
||||
fi
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue