# @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
# 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
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)/
# 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
USERNAME=$1
GROUPNAME=$2
ANSWER=$3
+SRCDIR=$4
INSTALL="nothing"
INSTALLED=0
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
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
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
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