From: Thibault Godouet Date: Mon, 15 May 2000 18:28:22 +0000 (+0000) Subject: adaptations for rcs X-Git-Tag: ver2_9_4~735 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e55dda0fe16e0c01f9b7bfb1997afb82ab0bcb9e;p=thirdparty%2Ffcron.git adaptations for rcs --- diff --git a/Makefile.in b/Makefile.in index f8289de..5edd3a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -2,6 +2,8 @@ # fcron's Makefile ######## ############################ +# $Id: Makefile.in,v 1.2 2000-05-15 18:28:58 thib Exp $ + # ********************************************************* # # *** Begin of configurable stuffs ************************ # @@ -83,6 +85,9 @@ allow.o: allow.c $(HEADERS) $(CC) $(CFLAGS) -c $< install: all + + @echo -e "\ninstalling ...\n" + $(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)/ @@ -91,40 +96,60 @@ install: all $(INSTALL) -m 644 -o root man/fcrontab.1 $(DESTMAN)/man1/ $(INSTALL) -m 644 -o root man/fcrontab.5 $(DESTMAN)/man5/ $(INSTALL) -m 644 -o root man/bitstring.3 $(DESTMAN)/man3/ - ./sysVinit-install "$(CFLAGS)" $(INSTALL) + script/sysVinit-install "$(CFLAGS)" $(INSTALL) mkdir -p /usr/doc/fcron-$(VERSION) - $(INSTALL) -m 644 -o root doc/* /usr/doc/fcron-$(VERSION)/ + cd doc; $(INSTALL) -m 644 -o root README LICENSE CHANGES *.html \ + /usr/doc/fcron-$(VERSION)/ mkdir -p $(FCRONTABS) chmod 700 $(FCRONTABS) + @echo -e "\n...done\n" + + uninstall: rm -f $(DESTSBIN)/fcron - ./sysVinit-uninstall + script/sysVinit-uninstall clean: + @echo -e "\ncleaning up ...\n" + rm -f *.o rm -f fcron fcrontab + @echo -e "\n...done\n" + vclean: clean find ./ -name "*~" -exec rm -f {} \; rm -f fcron*tar.gz -doc-changes: doc/ man/ - touch doc-changes +need_make_doc: +# force to do a part each time it is called if placed in its depencies. + +doc: need_make_doc + @echo -e "\nupdating docs ...\n" + + ./script/gen-doc $(VERSION) + + @echo -e "\n...done\n" -doc: doc-changes - ./gen-doc $(VERSION) - touch doc-changes tar: vclean doc - @(find ./ -type f | sed -e "s:^\./:fcron-$(VERSION)/:" > MANIFEST) + @echo -e "\ncreating archive ...\n" + + echo $(VERSION) > ./VERSION + + @(find ./ -type f ! -regex '.*RCS.*' -exec ci -l {} \;) + + @(find ./ -type f ! -regex '.*RCS.*' | sed -e "s:^\./:fcron-$(VERSION)/:" > MANIFEST) @(cd ..; ln -s fcron fcron-$(VERSION)) (cd ..; tar -czvf fcron-$(VERSION).src.tar.gz `cat fcron/MANIFEST`) @(cd ..; rm -f fcron-$(VERSION)) @(cd ..; cp -f fcron-$(VERSION).src.tar.gz old-fcron-pkg/) - @(cd ..; mv -f fcron-$(VERSION).src.tar.gz fcron/) + + @echo -e "\n...done\n" + diff --git a/allow.c b/allow.c index a8b0c73..4ad98dd 100644 --- a/allow.c +++ b/allow.c @@ -22,11 +22,10 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* ALLOW.C */ + /* $Id: allow.c,v 1.2 2000-05-15 18:28:31 thib Exp $ */ #include "fcrontab.h" - int in_file(char *str, char *file) /* return -1 if file can't be opened diff --git a/conf.c b/conf.c index b8e7cc8..5cac124 100644 --- a/conf.c +++ b/conf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* CONF.C */ + /* $Id: conf.c,v 1.2 2000-05-15 18:28:33 thib Exp $ */ #include "fcron.h" diff --git a/config.h.in b/config.h.in index ca62980..2e8b3fa 100644 --- a/config.h.in +++ b/config.h.in @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* config.h */ + /* $Id: config.h.in,v 1.2 2000-05-15 18:28:34 thib Exp $ */ /* *********************************************************** */ diff --git a/database.c b/database.c index 7e89314..d8ecf4b 100644 --- a/database.c +++ b/database.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* DATABASE.C */ + /* $Id: database.c,v 1.2 2000-05-15 18:28:36 thib Exp $ */ #include "fcron.h" diff --git a/fcron.c b/fcron.c index 1cabd5e..999b70c 100644 --- a/fcron.c +++ b/fcron.c @@ -21,10 +21,12 @@ * `LICENSE' that comes with the fcron source distribution. */ - /* fcron.c */ + /* $Id: fcron.c,v 1.2 2000-05-15 18:28:38 thib Exp $ */ #include "fcron.h" +char rcs_info[] = "$Id: fcron.c,v 1.2 2000-05-15 18:28:38 thib Exp $"; + void main_loop(void); void info(void); void usage(void); @@ -56,12 +58,12 @@ info(void) * version, license */ { fprintf(stderr, + "$Id: fcron.c,v 1.2 2000-05-15 18:28:38 thib Exp $\n" "fcron " VERSION " - periodic command scheduler\n" "Copyright 2000 Thibault Godouet \n" - "This program is free software; you can redistribute it\n" - " and/or modify it under the terms of the GNU General Public\n" - " License. See file LICENSE distributed with this program\n" - " for more informations\n" + "This program is free software distributed\n" + "WITHOUT ANY WARRANTY.\n" + "See the GNU General Public License for more details.\n" ); exit(EXIT_OK); diff --git a/fcron.h b/fcron.h index 80ab70e..b67c621 100644 --- a/fcron.h +++ b/fcron.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* fcron.h */ + /* $Id: fcron.h,v 1.2 2000-05-15 18:28:39 thib Exp $ */ #ifndef __FCRONH__ #define __FCRONH__ diff --git a/fcrontab.c b/fcrontab.c index 3135d8b..b3da212 100644 --- a/fcrontab.c +++ b/fcrontab.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* FCRONTAB.C */ + /* $Id: fcrontab.c,v 1.2 2000-05-15 18:28:41 thib Exp $ */ /* * The goal of this program is simple : giving a user interface to fcron @@ -42,6 +42,7 @@ #include "fcrontab.h" +char rcs_info[] = "$Id: fcrontab.c,v 1.2 2000-05-15 18:28:41 thib Exp $"; void info(void); void usage(void); @@ -78,12 +79,12 @@ info(void) * version, license */ { fprintf(stderr, + "$Id: fcrontab.c,v 1.2 2000-05-15 18:28:41 thib Exp $\n" "fcrontab " VERSION " - user interface to daemon fcron\n" "Copyright 2000 Thibault Godouet \n" - "This program is free software; you can redistribute it\n" - " and/or modify it under the terms of the GNU General Public\n" - " License. See file LICENSE distributed with this program\n" - " for more informations\n" + "This program is free software distributed\n" + "WITHOUT ANY WARRANTY.\n" + "See the GNU General Public License for more details.\n" ); exit(EXIT_OK); diff --git a/fcrontab.h b/fcrontab.h index 0ddc3f4..57edce7 100644 --- a/fcrontab.h +++ b/fcrontab.h @@ -21,7 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* fcrontab.h */ + /* $Id: fcrontab.h,v 1.2 2000-05-15 18:28:42 thib Exp $ */ #ifndef __FCRONTABH__ #define __FCRONTABH__ diff --git a/fileconf.c b/fileconf.c index f5771af..e50d6d7 100644 --- a/fileconf.c +++ b/fileconf.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* FILECONF.C */ + /* $Id: fileconf.c,v 1.2 2000-05-15 18:28:44 thib Exp $ */ #include "fcrontab.h" diff --git a/global.h b/global.h index cab04f3..de8c78a 100644 --- a/global.h +++ b/global.h @@ -21,8 +21,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* global.h */ - + /* $Id: global.h,v 1.2 2000-05-15 18:28:53 thib Exp $ */ #ifndef __GLOBALH__ #define __GLOBALH__ diff --git a/job.c b/job.c index 64537fa..48e6085 100644 --- a/job.c +++ b/job.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* JOB.C */ + /* $Id: job.c,v 1.2 2000-05-15 18:28:55 thib Exp $ */ #include "fcron.h" diff --git a/log.c b/log.c index 19b4a78..1e54c75 100644 --- a/log.c +++ b/log.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* log.c */ + /* $Id: log.c,v 1.2 2000-05-15 18:28:56 thib Exp $ */ /* This code is inspired by Anacron's sources of Itai Tzur ( thanks to him ) */ diff --git a/script/boot-install b/script/boot-install index 1fefbf1..6663c4c 100755 --- a/script/boot-install +++ b/script/boot-install @@ -2,6 +2,8 @@ # Install fcron under SysV system. # +# $Id: boot-install,v 1.2 2000-05-15 18:28:24 thib Exp $ + # take two arguments : first is the compilation line arguments, in order # to determine if fcron should be installed with debugs options, # and the second is the name of the BSD-like install program @@ -21,9 +23,9 @@ if test -f /etc/rc.d/rc.M; then else if echo $1 > grep "-DDEBUG"; then - $2 -m 755 -o root sysVinit-launcher-debug /etc/rc.d/init.d/fcron + $2 -m 755 -o root script/sysVinit-launcher-debug /etc/rc.d/init.d/fcron else - $2 -m 755 -o root sysVinit-launcher /etc/rc.d/init.d/fcron + $2 -m 755 -o root script/sysVinit-launcher /etc/rc.d/init.d/fcron fi cd /etc/rc.d/rc3.d/ diff --git a/script/boot-uninstall b/script/boot-uninstall index 2b5e5e0..623584b 100755 --- a/script/boot-uninstall +++ b/script/boot-uninstall @@ -2,6 +2,8 @@ # Uninstall fcron under SysV system. # +# $Id: boot-uninstall,v 1.2 2000-05-15 18:28:25 thib Exp $ + PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin" rm -f /etc/rc.d/init.d/fcron-debug diff --git a/script/gen-doc b/script/gen-doc index f543c6f..d588519 100755 --- a/script/gen-doc +++ b/script/gen-doc @@ -1,23 +1,49 @@ #!/bin/sh -cd man -for i in * -do - echo $i - sed -e "s:\"fcron version .* - .*\":\"fcron version $1 - `date +%D`\":" < $i > tmp - mv -f tmp $i - chown $USER $i - rm -f tmp - groff -Thtml -mandoc $i > ../doc/$i.html -done +# $Id: gen-doc,v 1.2 2000-05-15 18:28:22 thib Exp $ + +if test $UID -eq 0; then + su $USER +fi + +PREVIOUS=`cat ./VERSION` -cd ../doc + +if test $PREVIOUS != $1; then + cd man + for i in * + do + if test $i != RCS; then + echo $i + sed -e "s:fcron version .* :fcron version $1 :" < $i > tmp + mv -f tmp $i + rm -f tmp + fi + done + + + cd ../doc + for i in * + do + if test $i != RCS; then + echo $i + sed -e "s:fcron version .* :fcron version $1 :" < $i > tmp + mv -f tmp $i + rm -f tmp + fi + done +fi + + +cd man for i in * do - echo $i - sed -e "s:<-- fcron version .* - .* -->:<-- fcron version $1 - `date +%D` -->:" < $i > tmp - mv -f tmp $i - chown $USER $i - rm -f tmp + if test $i != RCS; then + echo $i + groff -Thtml -mandoc $i > ./tmp + sed "s::\ +

$i


:I" < ./tmp > ../doc/$i.html + rm -f ./tmp + fi done diff --git a/script/sysVinit-launcher b/script/sysVinit-launcher index 211ad30..1249ced 100755 --- a/script/sysVinit-launcher +++ b/script/sysVinit-launcher @@ -5,6 +5,8 @@ # processname: fcron # config: /var/spool/fcron/* +# $Id: sysVinit-launcher,v 1.2 2000-05-15 18:28:27 thib Exp $ + FUNCTION=0 # Source function library. diff --git a/subs.c b/subs.c index e2bce12..310ca2c 100644 --- a/subs.c +++ b/subs.c @@ -22,7 +22,7 @@ * `LICENSE' that comes with the fcron source distribution. */ -/* SUBS.C */ + /* $Id: subs.c,v 1.2 2000-05-15 18:28:59 thib Exp $ */ #include "global.h"