diff options
author | Didier Wenzek <didier.wenzek@acidalie.com> | 2022-08-29 15:53:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-29 15:53:18 +0200 |
commit | 0d7dd882829c69523066269ef2d6a7f9451a36ac (patch) | |
tree | b099f1152f5a82dbb335ac306ecfa0e8c976fc65 | |
parent | 53c75cb81ec4551fde6dab3e26ef55ff6cd7e7f2 (diff) | |
parent | 1c627374f60b202dd766067404f948f1b936a2e6 (diff) |
Merge pull request #1354 from Ruadhri17/scripts-improvement
Replace scripts commands for the cross-Unix system compatibility
-rw-r--r-- | configuration/debian/tedge/preinst | 6 | ||||
-rw-r--r-- | configuration/debian/tedge_agent/postinst | 2 | ||||
-rw-r--r-- | configuration/debian/tedge_mapper/postinst | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/configuration/debian/tedge/preinst b/configuration/debian/tedge/preinst index b2843104..ec91f6e8 100644 --- a/configuration/debian/tedge/preinst +++ b/configuration/debian/tedge/preinst @@ -3,13 +3,13 @@ set -e ### Create groups if ! getent group tedge >/dev/null; then - addgroup --quiet --system tedge + groupadd --system tedge fi ### Create users -# Create user tedge with no additional info(--gecos "") no home(--no-create-home), no login(--shell) and in group tedge(--ingroup) +# Create user tedge with no home(--no-create-home), no login(--shell) and in group tedge(--gid) if ! getent passwd tedge >/dev/null; then - adduser --quiet --system --gecos "" --no-create-home --disabled-login --shell /sbin/nologin --ingroup tedge tedge + useradd --system --no-create-home --shell /sbin/nologin --gid tedge tedge fi ### Create file in /etc/sudoers.d directory. With this configuration, the tedge user have the right to call the tedge command with sudo rights, which is required for system-wide configuration in "/etc/tedge" diff --git a/configuration/debian/tedge_agent/postinst b/configuration/debian/tedge_agent/postinst index 4059b182..348ebe12 100644 --- a/configuration/debian/tedge_agent/postinst +++ b/configuration/debian/tedge_agent/postinst @@ -13,6 +13,6 @@ if command -v systemctl >/dev/null; then fi # Initialize the agent -runuser -u tedge -- tedge_agent --init +sudo -u tedge -- tedge_agent --init #DEBHELPER# diff --git a/configuration/debian/tedge_mapper/postinst b/configuration/debian/tedge_mapper/postinst index bb12342a..a637165f 100644 --- a/configuration/debian/tedge_mapper/postinst +++ b/configuration/debian/tedge_mapper/postinst @@ -4,6 +4,6 @@ set -e ### Initialize the sm mapper -runuser -u tedge -- tedge_mapper --init c8y -runuser -u tedge -- tedge_mapper --init az +sudo -u tedge -- tedge_mapper --init c8y +sudo -u tedge -- tedge_mapper --init az #DEBHELPER# |