]> granicus.if.org Git - fcron/commitdiff
support for FreeBSD added
authorthib <thib>
Wed, 24 May 2000 17:51:17 +0000 (17:51 +0000)
committerthib <thib>
Wed, 24 May 2000 17:51:17 +0000 (17:51 +0000)
Makefile.in
fcron.c
global.h
script/boot-install

index e661e6cb8615558e10e72ece5bc4f8e46bf36d12..23142699c06d1f92d790231fe792f90511d10959 100644 (file)
@@ -2,7 +2,7 @@
 # fcron's Makefile  ########
 ############################
 
-# $Id: Makefile.in,v 1.7 2000-05-17 19:20:46 thib Exp $
+# $Id: Makefile.in,v 1.8 2000-05-24 17:51:59 thib Exp $
 
 # ********************************************************* #
 # *** Begin of configurable stuffs ************************ #
 # Where should we install it ?
 DESTSBIN= /usr/sbin/
 DESTBIN= /usr/bin/
+
+#DESTMAN= /usr/share/man/
 DESTMAN= /usr/man/
+
+#DESTDOC= /usr/share/
+DESTDOC= /usr/doc/
+
 FCRONTABS=/var/spool/fcron/
 ETC=/etc/
 
@@ -57,7 +63,7 @@ INSTALL= install
 # Should not be changed under this #
 ####################################
 
-export VERSION= 0.8.0
+VERSION= 0.8.1
 CFLAGS= $(INCLUDE) $(OPTIM) $(OTHERFLAGS) $(OPTION) -DVERSION=\"$(VERSION)\" -DFCRONTABS=\"$(FCRONTABS)\" -DETC=\"$(ETC)\"
 OBJSD = fcron.o subs.o database.o job.o log.o conf.o
 OBJS= fcrontab.o fileconf.o subs.o log.o allow.c
@@ -89,18 +95,18 @@ allow.o:  allow.c $(HEADERS)
 
 install: all
 
-       $(INSTALL) -m 111 -o root -s fcron $(DESTSBIN)/
-       $(INSTALL) -m 4111 -o root -s fcrontab $(DESTBIN)/
-       $(INSTALL) -m 700 -o root files/fcron.allow $(ETC)/
-       $(INSTALL) -m 700 -o root files/fcron.deny $(ETC)/
-       $(INSTALL) -m 644 -o root doc/fcron.8 $(DESTMAN)/man8/
-       $(INSTALL) -m 644 -o root doc/fcrontab.1 $(DESTMAN)/man1/
-       $(INSTALL) -m 644 -o root doc/fcrontab.5 $(DESTMAN)/man5/
-       $(INSTALL) -m 644 -o root doc/bitstring.3 $(DESTMAN)/man3/
+       $(INSTALL) -c -m 111 -o root -s fcron $(DESTSBIN)/
+       $(INSTALL) -c -m 4111 -o root -s fcrontab $(DESTBIN)/
+       $(INSTALL) -c -m 700 -o root files/fcron.allow $(ETC)/
+       $(INSTALL) -c -m 700 -o root files/fcron.deny $(ETC)/
+       $(INSTALL) -c -m 644 -o root doc/fcron.8 $(DESTMAN)/man8/
+       $(INSTALL) -c -m 644 -o root doc/fcrontab.1 $(DESTMAN)/man1/
+       $(INSTALL) -c -m 644 -o root doc/fcrontab.5 $(DESTMAN)/man5/
+       $(INSTALL) -c -m 644 -o root doc/bitstring.3 $(DESTMAN)/man3/
        script/sysVinit-install "$(CFLAGS)" $(INSTALL)
        mkdir -p /usr/doc/fcron-$(VERSION)
-       cd doc; $(INSTALL) -m 644 -o root README LICENSE CHANGES *.html \
-                /usr/doc/fcron-$(VERSION)/
+       cd doc; $(INSTALL) -c -m 644 -o root README LICENSE CHANGES *.html \
+                $(DESTDOC)/fcron-$(VERSION)/
        mkdir -p $(FCRONTABS)
        chmod 700 $(FCRONTABS)
 
@@ -145,3 +151,4 @@ tar: vclean updatedoc
 
 
 
+
diff --git a/fcron.c b/fcron.c
index fdb02246e2d7843c8ebd195d76b4a1ff0e0f433f..a73bb015a2961a7c72389640eef500922c022df6 100644 (file)
--- a/fcron.c
+++ b/fcron.c
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: fcron.c,v 1.6 2000-05-22 17:53:05 thib Exp $ */
+ /* $Id: fcron.c,v 1.7 2000-05-24 17:51:37 thib Exp $ */
 
 #include "fcron.h"
 
-char rcs_info[] = "$Id: fcron.c,v 1.6 2000-05-22 17:53:05 thib Exp $";
+char rcs_info[] = "$Id: fcron.c,v 1.7 2000-05-24 17:51:37 thib Exp $";
 
 void main_loop(void);
 void info(void);
@@ -182,6 +182,8 @@ parseopt(int argc, char *argv[])
 
     char c;
     int i;
+
+#ifdef __linux__
     static struct option opt[] =
     {
        {"debug",0,NULL,'d'},
@@ -191,13 +193,19 @@ parseopt(int argc, char *argv[])
        {"version",0,NULL,'V'},
        {0,0,0,0}
     };
+#endif
+
     extern char *optarg;
     extern int optind, opterr, optopt;
 
     /* constants and variables defined by command line */
 
     while(1) {
+#ifdef __linux
        c = getopt_long(argc, argv, "dfbhV", opt, NULL);
+#else
+       c = getopt(argc, argv, "dfbhV");
+#endif
        if (c == -1) break;
        switch (c) {
 
index de8c78a5f84c67fa82324fca480bb5ac56e75d9c..e2e47f5e3d5a460ceddc8e521b3b1a210d206256 100644 (file)
--- a/global.h
+++ b/global.h
  *  `LICENSE' that comes with the fcron source distribution.
  */
 
- /* $Id: global.h,v 1.2 2000-05-15 18:28:53 thib Exp $ */
+ /* $Id: global.h,v 1.3 2000-05-24 17:51:55 thib Exp $ */
 
 #ifndef __GLOBALH__
 #define __GLOBALH__
 
 #include <ctype.h>
 #include <errno.h>
+#ifdef __linux__
 #include <getopt.h>
+#endif
 #include <pwd.h>
 #include <signal.h>
 #include <stdarg.h>
index f78b4f04fe09f3502de89e6faff39e24d359123f..3bd2b556eb7ad5990a814f0635fbd7d443d2f90f 100755 (executable)
@@ -2,7 +2,7 @@
 # Install fcron under SysV system.
 #
 
-# $Id: boot-install,v 1.4 2000-05-17 19:19:30 thib Exp $
+# $Id: boot-install,v 1.5 2000-05-24 17:51:17 thib Exp $
 
 # take two arguments : first is the compilation line arguments, in order
 #    to determine if fcron should be installed with debugs options,
@@ -20,12 +20,16 @@ fi
 if test -f /etc/rc.d/rc.M; then
     # Slackware
     echo "fcron -b" >> /etc/rc.d/rc.local
-else
 
+else if test -f /etc/rc; then
+    # FreeBSD
+    echo "fcron -b" >> /etc/rc.d/rc.local
+
+else    
     if echo $1 | grep -e '-DDEBUG'; then
-      $2 -m 755 -o root script/sysVinit-launcher-debug /etc/rc.d/init.d/fcron
+      $2 -c -m 755 -o root script/sysVinit-launcher-debug /etc/rc.d/init.d/fcron
     else
-      $2 -m 755 -o root script/sysVinit-launcher /etc/rc.d/init.d/fcron
+      $2 -c -m 755 -o root script/sysVinit-launcher /etc/rc.d/init.d/fcron
     fi
     
     cd /etc/rc.d/rc3.d/