Browse Source

- install-man will automatically "fix" the path of the files referred in the
man pages
- switched to /dev/urandom instead of /dev/random (/dev/random blocks if it haven't gathered enough entropy and is is not present on all the systems)
- minor man pages fixes

Andrei Pelinescu-Onciul 21 years ago
parent
commit
c3e5dd3e68
5 changed files with 28 additions and 61 deletions
  1. 14 5
      Makefile
  2. 2 0
      Makefile.defs
  3. 5 5
      main.c
  4. 4 26
      ser.8
  5. 3 25
      ser.cfg.5

+ 14 - 5
Makefile

@@ -27,6 +27,8 @@
 #  2003-08-29  install-modules-doc split from install-doc, added 
 #               install-modules-all, removed README.cfg (andrei)
 #              added skip_cfg_install (andrei)
+#  2004-09-02  install-man will automatically "fix" the path of the files
+#               referred in the man pages
 #
 
 auto_gen=lex.yy.c cfg.tab.c   #lexx, yacc etc
@@ -328,8 +330,15 @@ install-modules-doc: $(doc-prefix)/$(doc-dir)
 
 
 install-man: $(man-prefix)/$(man-dir)/man8 $(man-prefix)/$(man-dir)/man5
-	$(INSTALL-TOUCH)  $(man-prefix)/$(man-dir)/man8/ser.8 
-	$(INSTALL-MAN)  ser.8 $(man-prefix)/$(man-dir)/man8/
-	$(INSTALL-TOUCH)  $(man-prefix)/$(man-dir)/man5/ser.cfg.5 
-	$(INSTALL-MAN)  ser.cfg.5 $(man-prefix)/$(man-dir)/man5
-
+		sed -e "s#/etc/ser/ser\.cfg#$(cfg-target)ser.cfg#g" \
+			-e "s#/usr/sbin/#$(bin-target)#g" \
+			-e "s#/usr/lib/ser/modules/#$(modules-target)#g" \
+			-e "s#/usr/share/doc/ser/#$(doc-target)#g" \
+			< ser.8 >  $(man-prefix)/$(man-dir)/man8/ser.8
+		chmod 644  $(man-prefix)/$(man-dir)/man8/ser.8
+		sed -e "s#/etc/ser/ser\.cfg#$(cfg-target)ser.cfg#g" \
+			-e "s#/usr/sbin/#$(bin-target)#g" \
+			-e "s#/usr/lib/ser/modules/#$(modules-target)#g" \
+			-e "s#/usr/share/doc/ser/#$(doc-target)#g" \
+			< ser.cfg.5 >  $(man-prefix)/$(man-dir)/man5/ser.cfg.5
+		chmod 644  $(man-prefix)/$(man-dir)/man5/ser.cfg.5

+ 2 - 0
Makefile.defs

@@ -118,7 +118,9 @@ endif
 ut-prefix = bin/
 # target dirs for various stuff
 cfg-target = $(prefix)/$(cfg-dir)
+bin-target = $(prefix)/$(bin-dir)
 modules-target = $(prefix)/$(modules-dir)
+doc-target = $(prefix)/$(doc-dir)
 
 
 ifeq ($(OS), solaris)

+ 5 - 5
main.c

@@ -1287,19 +1287,19 @@ int main(int argc, char** argv)
 	}
 
 	/* seed the prng */
-	/* try to use /dev/random if possible */
+	/* try to use /dev/urandom if possible */
 	seed=0;
-	if ((rfd=open("/dev/random", O_RDONLY))!=-1){
+	if ((rfd=open("/dev/urandom", O_RDONLY))!=-1){
 try_again:
 		if (read(rfd, (void*)&seed, sizeof(seed))==-1){
 			if (errno==EINTR) goto try_again; /* interrupted by signal */
-			LOG(L_WARN, "WARNING: could not read from /dev/random (%d)\n",
+			LOG(L_WARN, "WARNING: could not read from /dev/urandom (%d)\n",
 						errno);
 		}
-		DBG("read %u from /dev/random\n", seed);
+		DBG("read %u from /dev/urandom\n", seed);
 			close(rfd);
 	}else{
-		LOG(L_WARN, "WARNING: could not open /dev/random (%d)\n", errno);
+		LOG(L_WARN, "WARNING: could not open /dev/urandom (%d)\n", errno);
 	}
 	seed+=getpid()+time(0);
 	DBG("seeding PRNG with %u\n", seed);

+ 4 - 26
ser.8

@@ -86,7 +86,7 @@ Displays the version number.
 Reads the configuration from 
 .B " config\-file" 
 (default
-.I  ./ser.cfg
+.I  /etc/ser/ser.cfg
 ).
 .TP
 .BI \-l " address"
@@ -154,31 +154,9 @@ status.
 .B /usr/lib/ser/modules/*
 .PD
 .SH AUTHORS
-Andrei Pelinescu - Onciul, <[email protected]>
-.br
-Bogdan Andrei Iancu
-.br
-Daniel-Constantin Mierla
-.br 
-Jan Janak
-.br
-Jiri Kuthan
-.br
-Juha Heinanen
-.br
-Maxim Sobolev
-.br
-Miklos Tirpak
-.br
-Nils Ohlmeier
-.br
-Ramona-Elena Modroiu
-.br
-Raphael Coeffic
-.br
-Ricardo Baratto
-.br
-Stelios Sidiroglou-Douskos
+
+see 
+.B /usr/share/doc/ser/AUTHORS
 
 .SH SEE ALSO
 .BR ser.cfg(5)

+ 3 - 25
ser.cfg.5

@@ -29,31 +29,9 @@ This manual page is incomplete. For further information please read the
 .br
 
 .SH AUTHORS
-Andrei Pelinescu - Onciul, <[email protected]>
-.br
-Bogdan Andrei Iancu
-.br
-Daniel-Constantin Mierla
-.br 
-Jan Janak
-.br
-Jiri Kuthan
-.br
-Juha Heinanen
-.br
-Maxim Sobolev
-.br
-Miklos Tirpak
-.br
-Nils Ohlmeier
-.br
-Ramona-Elena Modroiu
-.br
-Raphael Coeffic
-.br
-Ricardo Baratto
-.br
-Stelios Sidiroglou-Douskos
+
+see 
+.B /usr/share/doc/ser/AUTHORS
 
 .SH SEE ALSO
 .BR ser(8)