diff -ruN passwd.orig/group-fink passwd/group-fink --- passwd.orig/group-fink Thu Jan 1 01:00:00 1970 +++ passwd/group-fink Wed Jul 25 16:48:54 2001 @@ -0,0 +1,8 @@ +# +# Fink group additions +# +# IDs are in the range 250..299 +# +news:*:250: +mysql:*:251: +pgsql:*:252: diff -ruN passwd.orig/passwd-fink passwd/passwd-fink --- passwd.orig/passwd-fink Thu Jan 1 01:00:00 1970 +++ passwd/passwd-fink Wed Jul 25 16:48:51 2001 @@ -0,0 +1,8 @@ +# +# Fink passwd additions +# +# IDs are in the range 250..299 +# +news:*:250:250::0:0:News Server:/:/dev/null +mysql:*:251:251::0:0:MySQL Database Server:/:/dev/null +pgsql:*:252:252::0:0:PostgreSQL Database Server:/:/dev/null diff -ruN passwd.orig/update-passwd.in passwd/update-passwd.in --- passwd.orig/update-passwd.in Thu Jan 1 01:00:00 1970 +++ passwd/update-passwd.in Wed Jul 25 16:54:22 2001 @@ -0,0 +1,63 @@ +#!/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, then say yes here. Or you can say no here" + echo "and make the adjustments manually (e.g. on your central NetInfo server)." + echo "If you don't know what all of this is about, 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 -d passwd . <$PREFIX/etc/passwd-fink + echo "Merging group info..." + niload -d group . <$PREFIX/etc/group-fink + echo "Done." +else + echo "Okay, not adding the entries." +fi +echo + +exit 0