Skip to content

Commit

Permalink
rpm: test whether system account is kept or not
Browse files Browse the repository at this point in the history
Signed-off-by: Kentaro Hayashi <[email protected]>
  • Loading branch information
kenhys committed Nov 17, 2023
1 parent 1e4c0a4 commit 15bf82e
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fluent-package/yum/install-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ for conf_path in /etc/td-agent/td-agent.conf /etc/fluent/fluentd.conf; do
fi
done

(! getent passwd fluentd >/dev/null)
(! getent group fluentd >/dev/null)
getent passwd fluentd >/dev/null
getent group fluentd >/dev/null

if [ $ENABLE_UPGRADE_TEST -eq 1 ]; then
echo "UPGRADE TEST from v4"
Expand Down
3 changes: 3 additions & 0 deletions fluent-package/yum/systemd-test/install-newly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ test -e /var/log/fluent/fluentd.log
sudo $DNF remove -y fluent-package
sudo systemctl daemon-reload

getent passwd fluentd >/dev/null
getent group fluentd >/dev/null

# `sudo systemctl daemon-reload` clears the service completely.
# (The result of `systemctl status` will be `unfound`)
# Note: RPM does not leave links like `@/etc/systemd/system/fluentd.service`.
Expand Down
5 changes: 5 additions & 0 deletions fluent-package/yum/systemd-test/update-from-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ test -e /var/log/fluent/fluentd.log
sudo $DNF remove -y fluent-package
sudo systemctl daemon-reload

getent passwd td-agent >/dev/null
getent group td-agent >/dev/null
getent passwd fluentd >/dev/null
getent group fluentd >/dev/null

# `sudo systemctl daemon-reload` clears the service completely.
# (The result of `systemctl status` will be `unfound`)
# Note: RPM does not leave links like `@/etc/systemd/system/fluentd.service`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,9 @@ test -e /var/log/fluent/fluentd.log
sudo $DNF remove -y fluent-package
(! systemctl status --no-pager td-agent)
(! systemctl status --no-pager fluentd)

getent passwd td-agent >/dev/null
getent group td-agent >/dev/null
getent passwd fluentd >/dev/null
getent group fluentd >/dev/null

5 changes: 5 additions & 0 deletions fluent-package/yum/systemd-test/update-to-next-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ test -e /var/log/fluent/fluentd.log
sudo $DNF remove -y fluent-package
sudo systemctl daemon-reload

(! getent passwd td-agent >/dev/null)
(! getent group td-agent >/dev/null)
getent passwd fluentd >/dev/null
getent group fluentd >/dev/null

# `sudo systemctl daemon-reload` clears the service completely.
# (The result of `systemctl status` will be `unfound`)
# Note: RPM does not leave links like `@/etc/systemd/system/fluentd.service`.
Expand Down

0 comments on commit 15bf82e

Please sign in to comment.