Skip to content
Snippets Groups Projects
Unverified Commit 306ced8a authored by Oliver Smith's avatar Oliver Smith
Browse files

install_pmbootstrap.sh: only create user if missing

parent 36d16e69
No related branches found
No related tags found
No related merge requests found
......@@ -54,10 +54,14 @@ if ! mount | grep -q /proc/sys/fs/binfmt_misc; then
fi
# Create pmos user
echo "Creating pmos user"
adduser -D pmos
chown -R pmos:pmos .
echo 'pmos ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
if id "pmos" > /dev/null 2>&1; then
echo "User 'pmos' exists already"
else
echo "Creating pmos user"
adduser -D pmos
chown -R pmos:pmos .
echo 'pmos ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
fi
# pmaports: either checked out in current dir, or let pmbootstrap download it
pmaports="$(cd "$(dirname "$0")"; pwd -P)"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment