aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2020-07-25 14:47:30 +0200
committerOlav Vitters <olav@vitters.nl>2020-07-25 14:47:30 +0200
commit11633f7c15556a40017e33aeb6f73774d4fb9dfb (patch)
treebae41288401043596ddc0e8d7eb8129241cc5f3f
parent708ceea5e5a504fb886144e4e74dc2b22ecdbf3d (diff)
downloadrpm-helper-11633f7c15556a40017e33aeb6f73774d4fb9dfb.tar
rpm-helper-11633f7c15556a40017e33aeb6f73774d4fb9dfb.tar.gz
rpm-helper-11633f7c15556a40017e33aeb6f73774d4fb9dfb.tar.bz2
rpm-helper-11633f7c15556a40017e33aeb6f73774d4fb9dfb.tar.xz
rpm-helper-11633f7c15556a40017e33aeb6f73774d4fb9dfb.zip
add-user: ShellCheck: fix quoting issues
-rwxr-xr-xadd-user4
1 files changed, 2 insertions, 2 deletions
diff --git a/add-user b/add-user
index 0c29bee..39fd59a 100755
--- a/add-user
+++ b/add-user
@@ -21,9 +21,9 @@ name=$3 # name of the user
dir=$4 # home directory
shell=$5 # shell
-if ! getent passwd $name > /dev/null 2>&1; then
+if ! getent passwd "$name" > /dev/null 2>&1; then
/usr/sbin/useradd -r -M -U \
- -s $shell -d $dir -c "system user for $pkg" $name > /dev/null
+ -s "$shell" -d "$dir" -c "system user for $pkg" "$name" > /dev/null
fi
exit 0