From: thib Date: Mon, 9 Jul 2001 13:07:58 +0000 (+0000) Subject: added support for nsswitch.conf in installation scripts X-Git-Tag: ver1564~214 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93229d641f63b8b9a6ac649a612428d729b95b2e;p=fcron added support for nsswitch.conf in installation scripts --- diff --git a/Makefile.in b/Makefile.in index e13cba1..29d9b94 100644 --- a/Makefile.in +++ b/Makefile.in @@ -4,7 +4,7 @@ # @configure_input@ -# $Id: Makefile.in,v 1.74 2001-07-07 17:44:45 thib Exp $ +# $Id: Makefile.in,v 1.75 2001-07-09 13:07:58 thib Exp $ # The following should not be edited manually (use configure options) # If you must do it, BEWARE : some of the following is also defined @@ -91,7 +91,7 @@ install: all # needed by boot-install script : echo `fcron -V 2>&1 | grep "^fcron "` > $(SRCDIR)/script/PREVIOUS_VERSION - $(SRCDIR)/script/user-group $(USERNAME) $(GROUPNAME) $(ANSWERALL) + $(SRCDIR)/script/user-group $(USERNAME) $(GROUPNAME) $(ANSWERALL) $(SRCDIR) # check if the directories we use exist, and if not, create them if test ! -d $(DESTSBIN); then $(INSTALL) -g $(ROOTGROUP) -o $(ROOTNAME) -m 755 -d $(DESTSBIN) ; fi @@ -111,9 +111,9 @@ install: all test -f $(ETC)/fcron.allow || test -f $(ETC)/fcron.deny || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.allow $(SRCDIR)/files/fcron.deny $(ETC) test -f $(ETC)/fcron.conf || $(INSTALL) -m 640 -o $(ROOTNAME) -g $(GROUPNAME) $(SRCDIR)/files/fcron.conf $(ETC) $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcron.8 $(DESTMAN)/man8 - $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcron.conf.5 $(DESTMAN)/man5 $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcrontab.1 $(DESTMAN)/man1 $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcrontab.5 $(DESTMAN)/man5 + $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/fcron.conf.5 $(DESTMAN)/man5 $(INSTALL) -m 644 -o $(ROOTNAME) $(SRCDIR)/doc/bitstring.3 $(DESTMAN)/man3 $(INSTALL) -m 644 -o $(ROOTNAME) doc/README doc/LICENSE doc/CHANGES doc/*.html \ $(DESTDOC)/fcron-$(VERSION)/ diff --git a/script/user-group b/script/user-group index 255f2a4..5eac790 100755 --- a/script/user-group +++ b/script/user-group @@ -4,15 +4,16 @@ # them if necessary. # -# $Id: user-group,v 1.8 2001-03-07 19:32:21 thib Exp $ +# $Id: user-group,v 1.9 2001-07-09 13:12:08 thib Exp $ -# take 3 arguments : username +# take 4 arguments : username # groupname # automatic answer +# the src dir PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" -if test $# -ne 3; then +if test $# -ne 4; then echo "Too few/many arguments" exit 1 fi @@ -20,6 +21,7 @@ fi USERNAME=$1 GROUPNAME=$2 ANSWER=$3 +SRCDIR=$4 INSTALL="nothing" INSTALLED=0 @@ -36,8 +38,8 @@ else CMD="groupadd $GROUPNAME" fi -echo -n "Checking if $GROUPNAME is in /etc/group ... " -if grep "^$GROUPNAME:" /etc/group > /dev/null; then +echo -n "Checking if group $GROUPNAME exists ... " +if $SRCDIR/script/has_group.pl $GROUPNAME; then echo "yes." INSTALLED=1 else @@ -53,6 +55,7 @@ else do echo "Would you like to add $GROUPNAME in /etc/passwd with the following command ?" echo " $CMD" + echo "If you use NYS, ldap, or similar, you should add the group manually (say no here)" echo -n "Please answer with 'y' or 'n' (default: 'y'): " read INSTALL NOTHING done @@ -84,8 +87,8 @@ GID="`cat /etc/group | grep fcron | awk -F ":" '{print $3}'`" INSTALL="nothing" INSTALLED=0 -echo -n "Checking if $USERNAME is in /etc/passwd ... " -if grep "^$USERNAME:" /etc/passwd > /dev/null; then +echo -n "Checking if user $USERNAME exists ... " +if $SRCDIR/script/has_user.pl $USERNAME; then echo "yes." INSTALLED=1 else @@ -109,6 +112,7 @@ else do echo "Would you like to add $USERNAME in /etc/passwd with the following command ?" echo " $CMD" + echo "If you use NYS, ldap, or similar, you should add the user manually (say no here)" echo -n "Please answer with 'y' or 'n' (default: 'y'): " read INSTALL NOTHING done