Skip to content

Commit

Permalink
deb: stop using '--wait' option of systemctl
Browse files Browse the repository at this point in the history
We misunderstood the use of this option.

By default, `systemctl status` waits until the unit's start-up is
completed (without `--no-block` option).
The option `--wait` is for blocking `systemctl start foobar` until the
service `foobar` is stopped.

Signed-off-by: Daijiro Fukuda <fukuda@clear-code.com>
  • Loading branch information
daipom committed Jul 18, 2023
1 parent 8bde5ab commit e8cadd9
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions fluent-package/apt/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,22 @@ sudo apt clean all
sudo apt update
sudo apt install -V -y td-agent=4.5.0-1

systemctl status --wait --no-pager td-agent
systemctl status --no-pager td-agent

# Install the current
sudo apt install -V -y \
/vagrant/${distribution}/pool/${code_name}/${channel}/*/*/fluent-package_*_${architecture}.deb

# Test: service status
systemctl status --wait --no-pager fluentd
! systemctl status --wait --no-pager td-agent
systemctl status --no-pager fluentd
! systemctl status --no-pager td-agent

# Test: restoring td-agent service alias
sudo systemctl unmask td-agent
sudo systemctl enable --now fluentd

systemctl status --wait --no-pager td-agent
systemctl status --wait --no-pager fluentd
systemctl status --no-pager td-agent
systemctl status --no-pager fluentd

# Test: config migration
test -L /etc/td-agent
Expand All @@ -53,8 +53,8 @@ test $(eval $env_vars && echo $FLUENT_PACKAGE_LOG_FILE) = "/var/log/fluent/td-ag

# Uninstall
sudo apt remove -y fluent-package
! systemctl status --wait --no-pager td-agent
! systemctl status --wait --no-pager fluentd
! systemctl status --no-pager td-agent
! systemctl status --no-pager fluentd

test -h /etc/systemd/system/td-agent.service
test -h /etc/systemd/system/fluentd.service

0 comments on commit e8cadd9

Please sign in to comment.