🔒 Repository is read-only – file editing is disabled.
123456789101112131415161718
INFO="\033[1;36m"
NORMAL="\033[0;39m"
UN=dhcpcd
ID=52
chmod 1777 var/tmp
chmod 700 var/lib/$UN
if ! (getent group $UN > /dev/null); then
printf "${INFO}Creating $UN group${NORMAL}\n"
groupadd -g $ID $UN
fi
if ! (getent passwd $UN > /dev/null); then
printf "${INFO}Creating $UN user${NORMAL}\n"
useradd -c "dhcpcd PrivSep" -d /var/lib/$UN \
-g $UN -s /usr/bin/false -u $ID $UN
fi
chown $UN:$UN var/lib/dhcpcd