Date: Fri, 3 Apr 2009 12:12:18 +0400 From: subbsd <subbsd@gmail.com> To: freebsd-ports@freebsd.org Subject: adding users in ports Message-ID: <200904031212.18475.subbsd@gmail.com>
next in thread | raw e-mail | index | archive | help
Hello maillist, I've planned porting some software to FreeBSD and currently generate Makefile for ports. My application required presence of some account in system. I've see many sample from current ports like "squid, cacti, avahi, mysql, pgsql, cups, distcc..." and many-many-many, they are using equally construction like: --- if ${PW} user show "${USER}" 2>/dev/null; then echo "You already have a user \"${USER}\", so I will use it." else if ${PW} useradd ${USER} -u ${UID} -g ${GROUP} -h - \ -d "/nonexistent" -s /usr/sbin/nologin -c "User user" then echo "Added user \"${USER}\"." else echo "Adding user \"${USER}\" failed..." exit 1 fi fi --- My question - why do not make this facility by generic (for example create add/del/check-existence procedure in some /usr/ports/Mk/bsd.users.mk file) ? Thanks
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200904031212.18475.subbsd>