Skip to content

Commit

Permalink
flux/xconf -g $group
Browse files Browse the repository at this point in the history
  • Loading branch information
sam#gemmi-win10 committed Jun 24, 2024
1 parent 0c461fc commit 077753c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions flux/src/xconf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,25 @@ rm -f /xconf.sh
# mkdir -p /var/log/supervisor
# echo "" > /dev/null
# $RUN
export group=headless
export user=headless

# group: $user, sudo
match1=$(cat /etc/group |grep sudo)
# groupadd > addgroup
if [ -s /bin/addgroup ]; then
addgroup $user; #opsuse15
addgroup $group; #opsuse15
test -z "$match1" && addgroup sudo
else
groupadd $user; #opsuse15
groupadd $group; #opsuse15
test -z "$match1" && groupadd sudo
fi
# user
if [ -s /bin/adduser ]; then
# busybox: adduser -s /bin/bash -G sudo u2 -S #-S 免密码询问
adduser -s /bin/bash -G sudo $user -S
adduser -s /bin/bash -g $group -G sudo $user -S
else
useradd -mp j9X2HRQvPCphA -s /bin/bash -G sudo $user
useradd -mp j9X2HRQvPCphA -s /bin/bash -g $group -G sudo $user
fi


Expand Down

0 comments on commit 077753c

Please sign in to comment.