diff -uNr passwd.orig/group-fink passwd/group-fink --- passwd.orig/group-fink Wed Dec 31 19:00:00 1969 +++ passwd/group-fink Mon Oct 13 20:56:18 2003 @@ -0,0 +1,17 @@ +# +# Fink group additions +# +# IDs are in the range 250..299 +# +news:*:250: +postgres:*:252:postgres +games:*:253: +canna:*:254: +postfix:*:255: +maildrop:*:256: +tomcat:*:257: +jabber:*:258: +opennms:*:259: +clamav:*:260: +mail:*:261: +distcc:*:262:distcc,root diff -uNr passwd.orig/passwd-fink.in passwd/passwd-fink.in --- passwd.orig/passwd-fink.in Wed Dec 31 19:00:00 1969 +++ passwd/passwd-fink.in Mon Oct 13 20:55:57 2003 @@ -0,0 +1,16 @@ +# +# Fink passwd additions +# +# IDs are in the range 250..299 +# +news:*:250:250::0:0:News Server:/dev/null:/dev/null +postgres:*:252:252::0:0:PostgreSQL Database Server:/dev/null:/dev/null +games:*:253:253::0:0:Game Files Owner:/dev/null:/dev/null +canna:*:254:254::0:0:Canna Japanese Input Server:/dev/null:/dev/null +postfix:*:255:255::0:0:Postfix Mail Transfer Agent:@PREFIX@/var/spool/postfix:/dev/null +tomcat:*:257:257::0:0:Tomcat Servlet Engine:@PREFIX@/var/tomcat4:/dev/null +jabber:*:258:258::0:0:Jabber Messaging Server:/dev/null:/dev/null +opennms:*:259:259::0:0:OpenNMS Network Management:@PREFIX@/var/opennms:/dev/null +clamav:*:260:260::0:0: Clam AntiVirus:/dev/null:/dev/null +cyrus:*:261:261::0:0:Cyrus Mailsystem User,,,:@PREFIX@/var/spool/cyrus:/bin/sh +distcc:*:262:262::0:0:distcc daemon,,,:@PREFIX@/var/spool/distcc:/dev/null diff -uNr passwd.orig/update-passwd.in passwd/update-passwd.in --- passwd.orig/update-passwd.in Wed Dec 31 19:00:00 1969 +++ passwd/update-passwd.in Mon Oct 13 20:55:57 2003 @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Merge Fink's passwd and group additions into NetInfo +# + +if [ `id -u` -ne 0 ]; then + echo "You must be root to run update-passwd." + exit 1 +fi + +PREFIX=@PREFIX@ + +if [ ! -f "$PREFIX/etc/passwd-fink" ]; then + echo "The file $PREFIX/etc/passwd-fink is missing." + echo "update-passwd can not continue without this file." + exit 1 +fi + +if [ ! -f "$PREFIX/etc/group-fink" ]; then + echo "The file $PREFIX/etc/group-fink is missing." + echo "update-passwd can not continue without this file." + exit 1 +fi + +echo +echo "The following user entries will be added to your NetInfo database:" +grep -v "^#" $PREFIX/etc/passwd-fink + +echo +echo "The following group entries will be added to your NetInfo database:" +grep -v "^#" $PREFIX/etc/group-fink + +echo +if [ "x$1" = "xpostinst" ]; then + echo "Existing entries with these names or numbers will be overwritten or" + echo "otherwise affected by this. On the other hand, some Fink packages will" + echo "not work unless these entries are in the NetInfo database. You can make" + echo "adjustments to the files $PREFIX/etc/passwd-fink and" + echo "$PREFIX/etc/group-fink now (from another window), then say yes here. Or" + echo "you can say no here and add the users and groups manually (e.g. on your" + echo "central NetInfo server). If you don't know what all of this is about," + echo "just say yes." +else + echo "Existing entries with these names or numbers will be overwritten or" + echo "otherwise affected by this." +fi +echo -n "Do you want to continue? [Y/n] " +read answer + +answer=`echo $answer | sed 's/^[yY].*$/y/'` + +if [ -z "$answer" -o "x$answer" = "xy" ]; then + echo + echo "Merging user info..." + niload passwd . <$PREFIX/etc/passwd-fink + echo "Merging group info..." + niload group . <$PREFIX/etc/group-fink + echo "Done." +else + echo "Okay, not adding the entries." +fi +echo + +exit 0