freebsd-ports/devel/sfslite/pkg-install
Pav Lucistnik b1e4210260 This is a port of the SFS-Lite development libraries. The SFS toolkit
was developed to support the SFS distributed file system (see
http://www.fs.net).  But because others use the toolkit for other
reasons, we're making SFS's libraries available as a separate,
lightweight package.  sfslite compiles much faster and can be
installed as different non-conflicting build modes (such as
sfslite-dbg or sfslite-noopt) so might be better for some applications
that need the SFS libraries but not SFS.

PR:		ports/86178
Submitted by:	Maxwell Krohn <krohn@mit.edu>
2005-09-17 11:04:52 +00:00

45 lines
798 B
Bash

#!/bin/sh
if [ -n "${PACKAGE_BUILDING}" ]; then
exit 0
fi
USER=sfs
GROUP=sfs
UID=171
GID=171
PW=/usr/sbin/pw
COMMENT='Self-Certifying File System'
if [ "$2" = "PRE-INSTALL" ]; then
echo -n "Checking for group '$GROUP'... "
if ! ${PW} groupshow $GROUP >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} groupadd $GROUP -g ${GID}; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi
echo -n "Checking for user '$USER'... "
if ! ${PW} usershow $USER >/dev/null 2>&1; then
echo -n "doesn't exist, adding... "
if ${PW} useradd $USER -u ${UID} -c ${COMMENT} \
-d /nonexistent -g $GROUP -s /sbin/nologin -h -; then
echo "success."
else
echo "FAILED!"
exit 1
fi
else
echo "exists."
fi
fi
exit 0