mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 17:59:20 -04:00
. Don't setup ${DATADIR} and in particular don't set the home directory
of the mud user to ${DATADIR} (but rather /nonexistent).
This commit is contained in:
parent
e3a46e7898
commit
0ea04986a0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88404
1 changed files with 1 additions and 20 deletions
|
@ -12,16 +12,6 @@ GROUP=${USER}
|
|||
UID=97
|
||||
GID=${UID}
|
||||
|
||||
if [ -z "${DATADIR}" ]; then
|
||||
DATADIR=${PKG_PREFIX}/share/dgd
|
||||
fi
|
||||
|
||||
if [ ! -d "${DATADIR}" ]; then
|
||||
echo -n "Attempting to create ${DATADIR} ..."
|
||||
mkdir -p "${DATADIR}"
|
||||
echo "done"
|
||||
fi
|
||||
|
||||
if pw groupshow "${GROUP}" 2>/dev/null; then
|
||||
echo "Using existing group \"${GROUP}\"."
|
||||
else
|
||||
|
@ -35,16 +25,9 @@ fi
|
|||
|
||||
if pw usershow "${USER}" 2>/dev/null; then
|
||||
echo "Using existing user \"${USER}\"."
|
||||
if pw usermod "${USER}" -d "${DATADIR}"
|
||||
then
|
||||
echo "Changed home directory of \"${USER}\" to \"${DATADIR}\""
|
||||
else
|
||||
echo "Changing home directory of \"${USER}\" to \"${DATADIR}\" failed..."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if pw useradd "${USER}" -u ${UID} -g "${GROUP}" -h - \
|
||||
-s "/bin/sh" -d "${DATADIR}" -c "MUD Owner"
|
||||
-s "/bin/sh" -d "/nonexistent" -c "MUD Owner"
|
||||
then
|
||||
echo "Added user \"${USER}\"."
|
||||
else
|
||||
|
@ -52,5 +35,3 @@ else
|
|||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
chown -R "${USER}:${GROUP}" "${DATADIR}"
|
||||
|
|
Loading…
Add table
Reference in a new issue