]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
Synced with latest from old repo
authorstangrze <stangrze@pld-linux.org>
Mon, 14 Jun 1999 21:17:11 +0000 (21:17 +0000)
committerstangrze <stangrze@pld-linux.org>
Mon, 14 Jun 1999 21:17:11 +0000 (21:17 +0000)
svn-id: @369

58 files changed:
.cvsignore
AUTHORS [new file with mode: 0644]
COPYING [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile [deleted file]
Makefile.am [new file with mode: 0644]
NEWS [new file with mode: 0644]
README [new file with mode: 0644]
autogen.sh [new file with mode: 0755]
configure.in [new file with mode: 0644]
doc/.cvsignore [new file with mode: 0644]
doc/Makefile.am [new file with mode: 0644]
doc/doexec.1 [new file with mode: 0644]
doc/ipcalc.1 [new file with mode: 0644]
doc/ipchains-setup.txt [moved from ipchains-setup.txt with 100% similarity]
doc/net-scripts.txt [moved from net-scripts.txt with 100% similarity]
doc/netreport.1 [new file with mode: 0644]
doc/sysconfig.txt [moved from sysconfig.txt with 99% similarity]
doc/sysvinitfiles [moved from sysvinitfiles with 89% similarity]
doc/usernetctl.1 [new file with mode: 0644]
doc/usleep.1 [new file with mode: 0644]
lang.csh [new file with mode: 0755]
lang.sh
ppp/Makefile.am [new file with mode: 0644]
ppp/ip-down.d/Makefile.am [new file with mode: 0644]
ppp/ip-up.d/Makefile.am [new file with mode: 0644]
rc-scripts.spec.in [moved from rc-scripts.spec with 84% similarity]
rc.d/Makefile.am [new file with mode: 0644]
rc.d/init.d/Makefile.am [new file with mode: 0644]
rc.d/init.d/functions
rc.d/init.d/functions.network [new file with mode: 0755]
rc.d/init.d/halt
rc.d/init.d/network
rc.d/init.d/reboot
rc.d/init.d/shutdwn
rc.d/init.d/single
rc.d/rc
rc.d/rc.serial
rc.d/rc.sysinit
src/Makefile.am [new file with mode: 0644]
sysconfig/Makefile.am [new file with mode: 0644]
sysconfig/interfaces/ifcfg-lo [new file with mode: 0644]
sysconfig/interfaces/ifcfg-ppp0.callback [new file with mode: 0644]
sysconfig/interfaces/ifcfg-ppp0.leased1 [new file with mode: 0644]
sysconfig/interfaces/ifcfg-ppp0.leased2 [new file with mode: 0644]
sysconfig/interfaces/ifcfg-ppp0.tpsa [new file with mode: 0644]
sysconfig/network
sysconfig/network-scripts/Makefile.am [new file with mode: 0644]
sysconfig/network-scripts/ifdown
sysconfig/network-scripts/ifdown-ppp
sysconfig/network-scripts/ifdown-sl
sysconfig/network-scripts/ifup
sysconfig/network-scripts/ifup-aliases
sysconfig/network-scripts/ifup-plip
sysconfig/network-scripts/ifup-post
sysconfig/network-scripts/ifup-ppp
sysconfig/network-scripts/ifup-sl
sysconfig/system

index 9fca2a13f187f91f7013994cca4a396e94d9c1ab..24c56128976237d88b4e3e50d171c2f6afd232a4 100644 (file)
@@ -1 +1,30 @@
-initscripts*.tar.gz
+Makefile
+Makefile.in
+*~
+*.bak
+rc-scripts.spec
+config.guess
+config.sub
+ltmain.sh
+config.h.in
+configure
+config.log
+config.h
+config.cache
+libtool
+config.status
+stamp-h
+stamp-h.in
+rc-scripts-*.tar.gz
+aclocal.m4
+ltconfig
+intl
+ABOUT-NLS
+.deps
+aclocal.m4
+configure.scan
+missing
+mkinstalldirs
+stamp.h
+version.h
+install-sh
diff --git a/AUTHORS b/AUTHORS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/Makefile b/Makefile
deleted file mode 100644 (file)
index 3ab6b9c..0000000
--- a/Makefile
+++ /dev/null
@@ -1,50 +0,0 @@
-ROOT=/
-
-VERSION=$(shell awk '/define version/ { print $$3 }' rc-scripts.spec)
-CVSTAG = r$(subst .,-,$(VERSION))
-
-all:
-       (cd src; make CFLAGS="$(CFLAGS)")
-
-install:
-       install -d $(ROOT)/etc/profile.d $(ROOT)/sbin/network-scripts
-       install -d $(ROOT)/etc/sysconfig/{interfaces,ipchains.d}
-       install -m644 inittab $(ROOT)/etc
-       install -m644 adjtime $(ROOT)/etc
-       install -m644 inputrc $(ROOT)/etc
-       install -m644 sysconfig/network $(ROOT)/etc/sysconfig
-       install -m644 sysconfig/system $(ROOT)/etc/sysconfig
-       install -m644 sysconfig/static-routes $(ROOT)/etc/sysconfig
-       install -m755 network-scripts/if* $(ROOT)/sbin/network-scripts
-       install -m644 network-scripts/network-functions $(ROOT)/sbin/network-scripts
-       install -m755 setsysfont $(ROOT)/sbin
-       install -m755 lang.sh $(ROOT)/etc/profile.d
-       cp -af sysconfig/interfaces $(ROOT)/etc/sysconfig
-       cp -af rc.d ppp $(ROOT)/etc
-       install -m755 $(ROOT)/sbin/network-scripts/ifup $(ROOT)/sbin
-       install -m755 $(ROOT)/sbin/network-scripts/ifdown $(ROOT)/sbin
-       (cd $(ROOT)/sbin/network-scripts; \
-         ln -sf ../ifup . ; \
-         ln -sf ../ifdown . )
-       (cd src; make install ROOT=$(ROOT))
-       mkdir -p $(ROOT)/var/run/netreport
-       chmod og=rwx,o=rx $(ROOT)/var/run/netreport
-       
-       install -m644 sysconfig/ipchains $(ROOT)/etc/sysconfig
-       cp -af sysconfig/ipchains.d $(ROOT)/etc/sysconfig
-
-tag-archive:
-       @cvs -Q tag -F $(CVSTAG)
-
-create-archive: tag-archive
-       @rm -rf /tmp/rc-scripts
-       @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) rc-scripts || echo GRRRrrrrr -- ignore [export aborted]
-       @mv /tmp/rc-scripts /tmp/rc-scripts-$(VERSION)
-       @cd /tmp; tar czSpf rc-scripts-$(VERSION).tar.gz rc-scripts-$(VERSION)
-       @rm -rf /tmp/rc-scripts-$(VERSION)
-       @cp /tmp/rc-scripts-$(VERSION).tar.gz .
-       @rm -f /tmp/rc-scripts-$(VERSION).tar.gz 
-       @echo " "
-       @echo "The final archive is ./rc-scripts-$(VERSION).tar.gz."
-
-archive: tag-archive create-archive
diff --git a/Makefile.am b/Makefile.am
new file mode 100644 (file)
index 0000000..b41b049
--- /dev/null
@@ -0,0 +1,26 @@
+
+SUBDIRS = src doc ppp sysconfig rc.d
+
+sysconf_DATA = \
+       adjtime \
+       inittab \
+       inputrc
+
+profiledir = @sysconfdir@/profile.d
+
+profile_DATA = \
+       lang.sh \
+       lang.csh
+       
+sbin_SCRIPTS = setsysfont
+
+EXTRA_DIST = \
+       $(sysconf_DATA) \
+       $(profile_DATA) \
+       $(sbin_SCRIPTS) \
+       rc-scripts.spec
+
+# make rpms
+rpm: $(PACKAGE).spec
+       $(MAKE) dist
+       rpm -ta --clean --rmsource $(PACKAGE)-$(VERSION).tar.gz
diff --git a/NEWS b/NEWS
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/autogen.sh b/autogen.sh
new file mode 100755 (executable)
index 0000000..b625a37
--- /dev/null
@@ -0,0 +1,141 @@
+
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="PLD rc-scripts"
+
+(test -f $srcdir/configure.in \
+  && test -d $srcdir/doc \
+  && test -d $srcdir/src) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level rc-scripts directory"
+
+    exit 1
+}
+
+DIE=0
+
+(autoconf --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`autoconf' installed to compile pinfo."
+  echo "Download the appropriate package for your distribution,"
+  echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/"
+  DIE=1
+}
+
+(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && {
+  (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`libtool' installed to compile pinfo."
+    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
+  grep "sed.*POTFILES" $srcdir/configure.in >/dev/null || \
+  (gettextize --version) < /dev/null > /dev/null 2>&1 || {
+    echo
+    echo "**Error**: You must have \`gettext' installed to compile pinfo."
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "(or a newer version if it is available)"
+    DIE=1
+  }
+}
+
+(automake --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: You must have \`automake' installed to compile pinfo."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+  NO_AUTOMAKE=yes
+}
+
+
+# if no automake, don't bother testing for aclocal
+test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
+  echo
+  echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
+  echo "installed doesn't appear recent enough."
+  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "(or a newer version if it is available)"
+  DIE=1
+}
+
+if test "$DIE" -eq 1; then
+  exit 1
+fi
+
+if test -z "$*"; then
+  echo "**Warning**: I am going to run \`configure' with no arguments."
+  echo "If you wish to pass any to it, please specify them on the"
+  echo \`$0\'" command line."
+  echo
+fi
+
+case $CC in
+xlc )
+  am_opt=--include-deps;;
+esac
+
+for coin in `find $srcdir -name configure.in -print`
+do 
+  dr=`dirname $coin`
+  if test -f $dr/NO-AUTO-GEN; then
+    echo skipping $dr -- flagged as no auto-gen
+  else
+    echo processing $dr
+    macrodirs=`sed -n -e 's,AM_ACLOCAL_INCLUDE(\(.*\)),\1,gp' < $coin`
+    ( cd $dr
+      aclocalinclude="$ACLOCAL_FLAGS"
+      for k in $macrodirs; do
+       if test -d $k; then
+          aclocalinclude="$aclocalinclude -I $k"
+       ##else 
+       ##  echo "**Warning**: No such directory \`$k'.  Ignored."
+        fi
+      done
+      if grep "^AM_GNU_GETTEXT" configure.in >/dev/null; then
+       if grep "sed.*POTFILES" configure.in >/dev/null; then
+         : do nothing -- we still have an old unmodified configure.in
+       else
+         echo "Creating $dr/aclocal.m4 ..."
+         test -r $dr/aclocal.m4 || touch $dr/aclocal.m4
+         echo "Running gettextize...  Ignore non-fatal messages."
+         echo "no" | gettextize --force --copy
+         echo "Making $dr/aclocal.m4 writable ..."
+         test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4
+        fi
+      fi
+      if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then
+       echo "Running libtoolize..."
+       libtoolize --force --copy
+      fi
+      echo "Running aclocal $aclocalinclude ..."
+      aclocal $aclocalinclude
+      if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then
+       echo "Running autoheader..."
+       autoheader
+      fi
+      echo "Running automake --gnu $am_opt ..."
+      automake --add-missing --gnu $am_opt
+      echo "Running autoconf ..."
+      autoconf
+    )
+  fi
+done
+
+conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c
+
+if test x$NOCONFIGURE = x; then
+  echo Running $srcdir/configure $conf_flags "$@" ...
+  $srcdir/configure $conf_flags "$@" \
+  && echo Now type \`make\' to compile $PKG_NAME
+else
+  echo Skipping configure process.
+fi
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..b99480a
--- /dev/null
@@ -0,0 +1,34 @@
+AC_INIT()
+
+PACKAGE=rc-scripts
+VERSION=0.0.5
+
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+
+dnl Checks for programs.
+AC_PROG_CC
+AC_ISC_POSIX
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+
+pppdir='${sysconfdir}/ppp'
+networkscriptsdir='${sbindir}/network-scripts'
+sysconfigdir='${sysconfdir}/sysconfig'
+rcdir='${sysconfdir}/rc.d'
+docdir="${prefix}/doc/$PACKAGE-$VERSION"
+libdir="${prefix}/lib"
+
+AC_SUBST(pppdir)
+AC_SUBST(networkscriptsdir)
+AC_SUBST(sysconfigdir)
+AC_SUBST(rcdir)
+AC_SUBST(docdir)
+AC_SUBST(libdir)
+
+AC_OUTPUT(Makefile src/Makefile doc/Makefile \
+       ppp/Makefile ppp/ip-up.d/Makefile ppp/ip-down.d/Makefile \
+       sysconfig/Makefile \
+       sysconfig/network-scripts/Makefile \
+       rc.d/Makefile rc.d/init.d/Makefile
+       rc-scripts.spec)
diff --git a/doc/.cvsignore b/doc/.cvsignore
new file mode 100644 (file)
index 0000000..aa61a42
--- /dev/null
@@ -0,0 +1 @@
+Makefile.in Makefile
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644 (file)
index 0000000..809965a
--- /dev/null
@@ -0,0 +1,18 @@
+@SET_MAKE@
+
+docdir = @docdir@
+
+man_MANS = \
+       doexec.1 \
+       ipcalc.1 \
+       netreport.1 \
+       usernetctl.1 \
+       usleep.1
+       
+doc_DATA = \
+       ipchains-setup.txt \
+       net-scripts.txt \
+       sysconfig.txt \
+       sysvinitfiles
+
+EXTRA_DIST = $(man_MANS) $(doc_DATA)
diff --git a/doc/doexec.1 b/doc/doexec.1
new file mode 100644 (file)
index 0000000..59b8b91
--- /dev/null
@@ -0,0 +1,12 @@
+.TH DOEXEC 1 "Red Hat Software" "RHS" \" -*- nroff -*-
+.SH NAME
+doexec \- run an executable with an arbitrary argv[0]
+.SH SYNOPSIS
+.B doexec
+\fI/path/to/executable\fP \fIargv[0]\fP [\fIargv[1-n]\fP]
+.SH DESCRIPTION
+.B doexec
+simply runs the executable with the argv list provided.  It allows you
+to specify an argv[0] other than the name of the executable.
+.SH OPTIONS
+All options are passed in the argv list to the executable being run.
diff --git a/doc/ipcalc.1 b/doc/ipcalc.1
new file mode 100644 (file)
index 0000000..2a72aa3
--- /dev/null
@@ -0,0 +1,33 @@
+.TH IPCALC 1 "Red Hat Software" "RHS" \" -*- nroff -*-
+.SH NAME
+ipcalc \- perform simple manipulation of IP addresses
+.SH SYNOPSIS
+.B ipcalc
+\fI[--hostname] [--broadcast] [--network] [--netmask] \fBip \fI[netmask]\fR
+
+.SH DESCRIPTION
+\fBipcalc\fR provides a simple way to calculate IP information for a host.
+The various options specify what information \fBipcalc\fR should display
+on standard out. Multiple options may be specified.
+
+.SH OPTIONS
+.TP
+.IP \fI--broadcast\fR 
+Display the broadcast address for the given IP address and netmask.
+
+.IP \fI--hostname\fR 
+Display the hostname for the given IP address.
+
+.IP \fI--netmask\fR
+Calculate the netmask for the given IP address. It assumes that the IP
+address is in a complete Class A, B, or C network. Many networks do
+not use the default netmasks, in which case an inappropriate value will
+be returned.
+
+.IP \fI--network\fR 
+Display the network address for the given IP address and netmask.
+
+.SH AUTHOR
+.nf
+Erik Troan <ewt@redhat.com>
+.fi
similarity index 100%
rename from ipchains-setup.txt
rename to doc/ipchains-setup.txt
similarity index 100%
rename from net-scripts.txt
rename to doc/net-scripts.txt
diff --git a/doc/netreport.1 b/doc/netreport.1
new file mode 100644 (file)
index 0000000..ff52e91
--- /dev/null
@@ -0,0 +1,22 @@
+.TH USERNETCTL 1 "Red Hat Software" "RHS" \" -*- nroff -*-
+.SH NAME
+netreport \- request notification of network interface changes
+.SH SYNOPSIS
+.B netreport
+\fI[\fP-r\fI]\fP
+.SH DESCRIPTION
+.B netreport
+tells the network management scripts to send a SIGIO signal
+to the process which called netreport when any network interface
+status changes occur.
+.SH OPTIONS
+.TP
+.B -r
+Remove the current request (if any) for the calling process.
+.PP
+.SH NOTES
+If a program does not call netreport with the
+.B -r
+option before it exits, and another process is created with the
+same PID before any changes take place in interface status, it
+is possible that the new process will receive a spurious SIGIO.
similarity index 99%
rename from sysconfig.txt
rename to doc/sysconfig.txt
index 65d40942e9d8471ed90f5fdacff97440d87449a7..646b642067a28e7f36ab096d4a1469c70eaad8bd 100644 (file)
@@ -36,7 +36,7 @@ Files in /etc/sysconfig
 /etc/sysconfig/network:
 
   NETWORKING=yes|no
-  IP6NETWORKING=yes|no
+  IPV6NETWORKING=yes|no
   HOSTNAME=<fqdn by default, but whatever hostname you want>
     Note: for compatibility with some old software people might
     install (like trn), the /etc/HOSTNAME file should contain the
similarity index 89%
rename from sysvinitfiles
rename to doc/sysvinitfiles
index 9e9ddeb799c4b963c9efa18b9c159dd1837b2909..158f8ba0286484c36fca6b1d952d1581e81b1ec0 100644 (file)
@@ -1,4 +1,4 @@
-Writing System V init scripts for Red Hat Linux
+Writing System V init scripts for PLD Linux
 ===============================================
 
 All System V init scripts are named /etc/rc.d/init.d/<servicename>
@@ -9,7 +9,7 @@ where <servicename> is the name of the service.  There must be no
 Sample Script
 =============
 
-#!/bin/bash
+#!/bin/sh
 #
 #      /etc/rc.d/init.d/<servicename>
 #
@@ -25,16 +25,21 @@ Sample Script
 # Source function library.
 . /etc/rc.d/init.d/functions
 
+# Running service --  nice level.
+if [ -f /etc/sysconfig/<service> ]; then
+    . /etc/sysconfig/<service>
+fi    
+
 <define any local shell functions used by the code that follows>
 
 case "$1" in
     start)
-       echo -n "Starting <servicename> services: "
+       show Starting <servicename> services
        <start daemons, perhaps with the daemon function>
        touch /var/lock/subsys/<servicename>
        ;;
     stop)
-       echo -n "Shutting down <servicename> services: "
+       show Shutting down <servicename> services
        <stop daemons, perhaps with the killproc function>
        rm -f /var/lock/subsys/<servicename>
        ;;
@@ -58,7 +63,7 @@ case "$1" in
        $0; see the description under the probe tag below.>
        ;;
     *)
-       echo "Usage: <servicename> {start|stop|status|reload|restart[|probe]"
+       echo "Usage: $0 {start|stop|status|reload|restart[|probe]"
        exit 1
        ;;
 esac
@@ -77,9 +82,9 @@ Functions in /etc/rc.d/init.d/functions
 
 daemon [+/-nicelevel] program [arguments] [&]
 
-       Starts a daemon, if it is not already running.  Does
-       other useful things like keeping the daemon from dumping
-       core if it terminates unexpectedly.
+       Obsoletes starts a daemon, if it is not already running.
+       Does other useful things like keeping  the  daemon  from 
+       dumping core if it terminates unexpectedly.
 
 killproc program [signal]
 
@@ -141,8 +146,8 @@ Tags
 
        Optional, multiple entries allowed.  For each static config
        file used by the daemon, use a single entry.  For example:
-       # config: /etc/httpd/conf/httpd.conf
-       # config: /etc/httpd/conf/srm.conf
+       # config: /etc/httpd/httpd.conf
+       # config: /etc/httpd/srm.conf
 
        Optionally, if the server will automatically reload the config
        file if it is changed, you can append the word "autoreload" to
@@ -179,3 +184,4 @@ Tags
        configuration files.
 
 Copyright (c) 1998 Red Hat Software, Inc.
+Modified Corrected & Overlocked by PLD (r) Team 1999.
diff --git a/doc/usernetctl.1 b/doc/usernetctl.1
new file mode 100644 (file)
index 0000000..ff3ca59
--- /dev/null
@@ -0,0 +1,28 @@
+.TH USERNETCTL 1 "Red Hat Software" "RHS" \" -*- nroff -*-
+.SH NAME
+usernetctl \- allow a user to manipulate a network interface if permitted
+.SH SYNOPSIS
+.B usernetctl
+\fIinterface-name\fP up\fI|\fPdown\fI|\fPreport
+.SH DESCRIPTION
+.B usernetctl
+checks to see if users are allowed to manipulate the network interface
+specified by \fIinterface-name\fP, and then tries to bring the network
+interface up or down, if up or down was specified on the command line,
+or returns true or false status (respectively) if the report option was
+specified.
+.SH OPTIONS
+.TP
+.I "\fIinterface-name"
+The name of the network interface to check; for example, "ppp0".  For
+backwards compatibility, "ifcfg-ppp0" and
+"/etc/sysconfig/network-scripts/ifcfg-ppp0" are also supported.
+.TP
+up\fI|\fPdown
+Attempt to bring the interface up or down.
+.TP
+report
+Report on whether users can bring the interface up or down.
+.SH NOTES
+Alternate device configurations may inherit the default configuration's
+permissions.
diff --git a/doc/usleep.1 b/doc/usleep.1
new file mode 100644 (file)
index 0000000..f1e1902
--- /dev/null
@@ -0,0 +1,20 @@
+.TH USLEEP 1 "Red Hat Software" "RHS" \" -*- nroff -*-
+.SH NAME
+usleep \- sleep some number of microseconds
+.SH SYNOPSIS
+.B usleep
+[\fInumber\fP]
+.SH DESCRIPTION
+.B usleep
+sleeps some number of microseconds.  The default is 1.
+.SH OPTIONS
+\fI--help\fP
+Print help information.
+.TP
+\fI-v\fP
+Print version information.
+.SH BUGS
+Probably not accurate on many machines down to the microsecond.  Count
+on precision only to -4 or maybe -5.
+.SH AUTHOR
+Donald Barnes <djb@redhat.com>
diff --git a/lang.csh b/lang.csh
new file mode 100755 (executable)
index 0000000..c12d7bc
--- /dev/null
+++ b/lang.csh
@@ -0,0 +1,35 @@
+#!/bin/csh
+
+if [ -f /etc/sysconfig/i18n ]; then
+    . /etc/sysconfig/i18n
+
+    if [ -n "$LANG" ]; then
+       setenv LANG
+    fi
+
+    if [ -n "$LC_ALL" ]; then
+       setenv LC_ALL
+    fi
+  
+    if [ -n "$LINGUAS" ]; then
+       setenv LINGUAS
+    fi
+  
+    if [ -n "$SYSTERM" ]; then
+       setenv TERM=$SYSTERM
+    fi
+
+    # Set console font map.
+    if [ -n "$UNIMAP" ]; then
+       loadunimap $UNIMAP
+    fi
+
+    if [ -n "$SYSTERM" ] ; then
+       case $SYSTERM in
+           linux-lat)
+               setenv LESSCHARSET=latin1
+               setenv INPUTRC=/etc/inputrc
+               ;;
+       esac
+    fi
+fi
diff --git a/lang.sh b/lang.sh
index 176305746240331d63c48e6aff31da8437621b34..425699d2ded577f9516b2f62b262ddbf98d386d8 100755 (executable)
--- a/lang.sh
+++ b/lang.sh
@@ -3,34 +3,47 @@
 if [ -f /etc/sysconfig/i18n ]; then
     . /etc/sysconfig/i18n
 
-    if [ -n "$LANG" ]; then
-       export LANG
-    fi
-
-    if [ -n "$LC_ALL" ]; then
-       export LC_ALL
-    fi
-  
-    if [ -n "$LINGUAS" ]; then
-       export LINGUAS
-    fi
-  
-    if [ -n "$SYSTERM" ]; then
-       export TERM=$SYSTERM
-    fi
-
-    # Set console font map.
-    if [ -n "$UNIMAP" ]; then
-       loadunimap $UNIMAP
-    fi
-
-    if [ -n "$SYSTERM" ] ; then
-       case $SYSTERM in
-           linux-lat)
-               LESSCHARSET=latin1
-               INPUTRC=/etc/inputrc
-               export LESSCHARSET INPUTRC
-               ;;
-       esac
-    fi
+   [ -n "$LANG" ] && export LANG || unset LANG
+   [ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
+   [ -n "$LC_COLLATE" ] && export LC_COLLATE || unset LC_COLLATE
+   [ -n "$LC_MESSAGES" ] && export LC_MESSAGES || unset LC_MESSAGES
+   [ -n "$LC_NUMERIC" ] && export LC_NUMERIC || unset LC_NUMERIC
+   [ -n "$LC_MONETARY" ] && export LC_MONETARY || unset LC_MONETARY
+   [ -n "$LC_TIME" ] && export LC_TIME || unset LC_TIME
+   [ -n "$LC_ALL" ] && export LC_ALL || unset LC_ALL
+   [ -n "$LANGUAGE" ] && export LANGUAGE || unset LANGUAGE
+   [ -n "$LINGUAS" ] && export LINGUAS || unset LINGUAS
+
+   # deprecated
+   if [ -n "$SYSTERM" ]; then
+      export TERM=$SYSTERM
+   fi
+
+   if [ -n "$SYSFONTACM" ]; then
+       case $SYSFONTACM in
+         iso01*|iso02*|iso15*|koi*)
+              LESSCHARSET=latin1
+             INPUTRC=/etc/inputrc
+              export LESSCHARSET INPUTRC
+              if [ "$TERM" = "linux" ]; then
+                  if ls -l /proc/$$/fd/0 2>/dev/null | grep -- '-> /dev/tty[0-9]*$' >/dev/null 2>&1; then
+                      echo -n -e '\033(K' > /proc/$$/fd/0
+                  fi
+              fi
+              ;;
+      esac
+   fi
+
+   if [ -n "$INPUTRC" ]; then
+      export INPUTRC
+   fi
+
+   if [ -n "$LESSCHARSET" ]; then
+       export LESSCHARSET
+   elif [ "$TERM" = "linux-lat" ]; then
+       LESSCHARSET=latin1
+      export LESSCHARSET
+   fi
+
+
 fi
diff --git a/ppp/Makefile.am b/ppp/Makefile.am
new file mode 100644 (file)
index 0000000..d420b4b
--- /dev/null
@@ -0,0 +1,11 @@
+@SET_MAKE@
+
+SUBDIRS = ip-up.d ip-down.d
+
+pppdir = @pppdir@
+
+ppp_SCRIPTS = \
+       ip-up \
+       ip-down 
+
+EXTRA_DIST = $(ppp_SCRIPTS)    
diff --git a/ppp/ip-down.d/Makefile.am b/ppp/ip-down.d/Makefile.am
new file mode 100644 (file)
index 0000000..a74542c
--- /dev/null
@@ -0,0 +1,7 @@
+@SET_MAKE@
+
+ipdowndir= @pppdir@/ip-down.d
+
+ipdown_SCRIPTS = logger
+
+EXTRA_DIST = $(ipdown_SCRIPTS)
diff --git a/ppp/ip-up.d/Makefile.am b/ppp/ip-up.d/Makefile.am
new file mode 100644 (file)
index 0000000..4622300
--- /dev/null
@@ -0,0 +1,7 @@
+@SET_MAKE@
+
+ipupdir= @pppdir@/ip-up.d
+
+ipup_SCRIPTS = logger
+
+EXTRA_DIST = $(ipup_SCRIPTS)
similarity index 84%
rename from rc-scripts.spec
rename to rc-scripts.spec.in
index dad62ce26d7e8808fc83d91c0165e8d6f0f95458..cc676315e5183ffa9a0220f3f3acb2bf02ef1bc3 100644 (file)
@@ -4,18 +4,19 @@ Summary(fr):  inittab et scripts /etc/rc.d
 Summary(pl):   inittab i skrypty startowe z katalogu /etc/rc.d
 Summary(tr):   inittab ve /etc/rc.d dosyalarý
 Name:          rc-scripts
-Version:       0.0.4
+Version:       @VERSION@
+Release:       1
 Copyright:     GPL
 Group:         Base
 Group(pl):     Bazowe  
-Release:       1
 Source:                %{name}-%{version}.tar.gz
-Buildroot:     /tmp/buildroot-%{name}-%{version}
 Requires:      mingetty
 Requires:      mktemp
 Requires:      modutils >= 2.1.121
 Prereq:                /sbin/chkconfig
 Obsoletes:     initscripts
+Provides:      initscripts
+Buildroot:     /tmp/buildroot-%{name}-%{version}
 
 %description
 This package contains the scripts use to boot a system, change run
@@ -47,9 +48,8 @@ Summary:      network startup scripts
 Summary(pl):   skrypty startowe sieci
 Group:         Base
 Group(pl):     Bazowe  
-Requires:      rc-scripts = %{version}
+Requires:      %{name} = %{version}
 Requires:      modutils >= 2.1.121
-Provides:      initscripts
 Prereq:                /sbin/chkconfig
 
 %description -n net-scripts
@@ -63,7 +63,7 @@ Summary:      firewall chains setup script
 Summary(pl):   skrypty konfiguruj±cy regu³y filtrowania pakietów IP
 Group:         Base
 Group(pl):     Bazowe  
-Requires:      rc-scripts = %{version}
+Requires:      net-scripts = %{version}
 Requires:      ipchains
 Prereq:                /sbin/chkconfig
 
@@ -77,16 +77,22 @@ Skrypt u
 %setup -q
 
 %build
-CFLAGS="$RPM_OPT_FLAGS -w" make
+%configure --prefix=/
+make
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/etc/rc.d/init.d
+install -d $RPM_BUILD_ROOT/var/run/netreport
 
-make ROOT=$RPM_BUILD_ROOT install 
+make install  \
+       DESTDIR=$RPM_BUILD_ROOT \
+       mandir=/usr/man \
+       
+ln -s network-scripts/ifup $RPM_BUILD_ROOT/sbin/ifup
+ln -s network-scripts/ifdown $RPM_BUILD_ROOT/sbin/ifdown
 
 gzip -9nf $RPM_BUILD_ROOT/usr/man/man*/* \
-       sysconfig.txt net-scripts.txt
+       doc/*.txt 
 
 %post
 for i in  halt nfsfs random reboot single  
@@ -130,7 +136,7 @@ fi
 
 %files
 %defattr(644,root,root,754)
-%doc sysconfig.txt.gz
+%doc doc/sysconfig.txt.gz
 
 %config(noreplace) %verify(not md5 mtime size) /etc/adjtime
 %config(noreplace) %verify(not md5 mtime size) /etc/inittab
@@ -160,14 +166,15 @@ fi
 
 %files -n net-scripts
 %defattr(644,root,root,754)
-%doc /etc/sysconfig/interfaces/*-template!
-%doc /etc/sysconfig/interfaces/data/chat-ppp*
-%doc net-scripts.txt.gz
+%doc sysconfig/interfaces/*-template!
+%doc sysconfig/interfaces/data/chat-ppp*
+%doc doc/net-scripts.txt.gz
 %attr(754,root,root) /etc/rc.d/init.d/network
 %attr(750,root,root) %dir /var/run/netreport
 %attr(755,root,root) %dir /etc/sysconfig/interfaces
 %attr(755,root,root) %dir /etc/sysconfig/interfaces/data
-%attr(755,root,root,755) /etc/ppp
+%attr(755,root,root) %dir /etc/ppp
+%attr(755,root,root) /etc/ppp/*
 
 %attr(755,root,root) %dir /sbin/network-scripts
 %attr(755,root,root) /sbin/network-scripts/if*
@@ -177,7 +184,7 @@ fi
 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/network
 %attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/static-routes
 
-%attr(755,root,root) /usr/sbin/usernetctl
+%attr(755,root,root) /sbin/usernetctl
 %attr(755,root,root) /bin/ipcalc
 %attr(755,root,root) /sbin/netreport
 %attr(755,root,root) /sbin/ifup
@@ -189,30 +196,34 @@ fi
 
 %files -n ipchains-setup
 %defattr(644,root,root,754)
-%doc ipchains-setup.txt.gz
+%doc doc/ipchains-setup.txt.gz
 %attr(754,root,root) /etc/rc.d/init.d/ipchains
 %attr(755,root,root) %dir /etc/sysconfig/ipchains.d/
 %attr(755,root,root) %dir /etc/sysconfig/interfaces/data
-%attr(755,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ipchains.d/*
-%attr(644,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ipchains
+%attr(750,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ipchains.d/*
+%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/ipchains
 
 %changelog
-* Wed Apr 28 1999 Jacek Konieczny <jajcus@zeus.polsl.gliwice.pl>
+* Thu Apr 29 1999 PLD Team <bugs@pld.org.pl>
+  [0.0.5-1]
+- automake/autoconf support
+
+* Wed Apr 28 1999 PLD Team <bugs@pld.org.pl>
   [0.0.4-1]
 - added ipchains-setup  
 
-* Thu Apr 22 1999 Jacek Konieczny <jajcus@zeus.polsl.gliwice.pl>
+* Thu Apr 22 1999 PLD Team <bugs@pld.org.pl>
   [0.0.3-1]
 - split into two packages: rc-scripts & net-scripts  
 - directory structure changed - only config in /etc
 
-* Tue Mar 23 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
+* Tue Mar 23 1999 PLD Team <bugs@pld.org.pl>
   [0.0.2-1]
 - be more verbose while upgrading when /etc/inittab.rpmsave is found,
 - added seting NETWORK="no" variable to when /etc/sysconfig/network is not present
   or when NETWORK in this file is not defined.
 
-* Sun Mar 21 1999 Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
+* Sun Mar 21 1999 PLD Team <bugs@pld.org.pl>
   [0.0.1-1]
 - added /etc/sysconfig/system,
 - removed man group from man pages,
@@ -220,6 +231,7 @@ fi
 - removed %config from scripts.
 
 * Fri Mar 19 1999 PLD Team <bugs@pld.org.pl>
-- Full changelog in PLD's CVS.
+- Modified handling ppp links. Added new features to ifcfg-ppp
+  and changed syntax of chat scripts for ppp.
 - First Release.
 - Package based on RedHat's initscripts-3.78.
diff --git a/rc.d/Makefile.am b/rc.d/Makefile.am
new file mode 100644 (file)
index 0000000..d3a2f30
--- /dev/null
@@ -0,0 +1,13 @@
+@SET_MAKE@
+
+SUBDIRS = init.d
+
+rcdir = @rcdir@
+
+rc_SCRIPTS = \
+       rc \
+       rc.local \
+       rc.serial \
+       rc.sysinit
+
+EXTRA_DIST = $(rc_SCRIPTS)     
diff --git a/rc.d/init.d/Makefile.am b/rc.d/init.d/Makefile.am
new file mode 100644 (file)
index 0000000..d203fea
--- /dev/null
@@ -0,0 +1,18 @@
+@SET_MAKE@
+
+initdir = @rcdir@/init.d
+
+init_SCRIPTS = \
+       halt \
+       ipchains \
+       killall \
+       network \
+       nfsfs \
+       random \
+       reboot \
+       shutdwn \
+       single
+
+init_DATA = functions
+       
+EXTRA_DIST = $(init_SCRIPTS) $(init_DATA)      
index b10e69c188aaefa48cd0c756cfb119ac6e6574c2..2ead74cbbaafeb9068326c694c676e1b4e2ac6ff 100644 (file)
@@ -1,52 +1,67 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# Version:     @(#) /etc/init.d/functions $Revision: 1.6 $ $Date: 1999/06/14 21:05:09 $
+# Version:     @(#) /etc/init.d/functions $Revision: 1.7 $ $Date: 1999/06/14 21:17:10 $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
-# Modified for PLD by Marek Obuchowicz <elephant@shadow.eu.org>
-#
+# Modified for PLD by:
+#              Marek Obuchowicz <elephant@shadow.eu.org>
+#              Arkadiusz Mi¶kiewicz <misiek@pld.org.pl> 
 
 # First set up a default search path.
 PATH="/sbin:/usr/sbin:/bin:/usr/bin"; export PATH
 
+[ -z "$COLUMNS" ] && COLUMNS=80
+
 # Some functions to handle PLD-style messages
-function show {
+show() 
+{
   text="$*".............................................
   echo -ne `echo $text | cut -c1-45`
 }
 
-function busy {
+busy() 
+{
   echo -n "`tput setaf 6`[`tput setaf 5` BUSY `tput setaf 6`]`tput setaf 7`"
 }
 
-function ok {
+ok() 
+{
   echo  "`tput setaf 6`[`tput setaf 2` DONE `tput setaf 6`]`tput setaf 7`"
 }
 
-function fail {
+started()
+{
+  echo  "`tput setaf 6`[`tput setaf 2` WORK `tput setaf 6`]`tput setaf 7`"
+}
+
+fail() 
+{
   echo  "`tput setaf 6`[`tput setaf 1` FAIL `tput setaf 6`]`tput setaf 7`"
 }
 
-function died {
+died() 
+{
   echo  "`tput setaf 6`[`tput setaf 1` DIED `tput setaf 6`]`tput setaf 7`"
 }
 
-function deltext {
+deltext() 
+{
   echo -ne '\b\b\b\b\b\b\b\b'
 }
 
-# A function to start a program.
-daemon() {
-       TMPFILE=`mktemp /tmp/init-XXXXXX`
-       
+# A function to start a program (now it's usefull on read-only filesystem too)
+daemon() 
+{
        nicelevel=0
+       _ERRORS=""
+       [ -z "$DEFAULT_SERVICE_RUN_NICE_LEVEL" ] && DEFAULT_SERVICE_RUN_NICE_LEVEL=0
        # Test syntax.
        case $1 in
            '')    echo '$0: Usage: daemon [+/-nicelevel] {program}'
                   return 1;;
-           -*|+*) nicelevel=$1
+           -*|+*) SERVICE_RUN_NICE_LEVEL=$1
                   shift;;
        esac
 
@@ -56,19 +71,20 @@ daemon() {
 
        # And start it up.
        busy
-       if nice -n $nicelevel "$@" >$TMPFILE 2>&1; then
+       if _ERRORS="`nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c \"$@\" 2>&1`"; then
          deltext
          ok
        else
          deltext
          fail
-         cat $TMPFILE
+         echo $_ERRORS
        fi
-       rm -f $TMPFILE
+       unset _ERRORS
 }
 
 # A function to stop a program.
-killproc() {
+killproc() 
+{
        # Test syntax.
        if [ $# = 0 ]; then
                echo "Usage: killproc {program} [signal]"
@@ -130,7 +146,8 @@ killproc() {
 }
 
 # A function to find the pid of a program.
-pidofproc() {
+pidofproc() 
+{
        # Test syntax.
        if [ $# = 0 ] ; then
                echo "Usage: pidofproc {program}"
@@ -167,7 +184,8 @@ pidofproc() {
        return 1
 }
 
-status() {
+status() 
+{
        # Test syntax.
        if [ $# = 0 ] ; then
                echo "Usage: status {program}"
diff --git a/rc.d/init.d/functions.network b/rc.d/init.d/functions.network
new file mode 100755 (executable)
index 0000000..e107f6c
--- /dev/null
@@ -0,0 +1,283 @@
+# This is not a shell script; it provides functions to network scripts
+# that source it.
+
+source_config ()
+{
+    DEVNAME=`basename $CONFIG | sed 's/^ifcfg-//g'`
+
+    if basename $CONFIG | grep -q '[^g]-' ; then
+       PARENTCONFIG=`echo $CONFIG | sed 's/-[^-]*$//g'`
+       PARENTDEVNAME=`echo $PARENTCONFIG | sed 's/^ifcfg-//g'`
+       [ -f $PARENTCONFIG ] || {
+           echo "Missing config file $PARENTCONFIG." >&2
+           exit 1
+       }
+       . ./$PARENTCONFIG
+    fi
+    . /etc/sysconfig/interfaces/$CONFIG
+}
+
+do_netreport ()
+{
+  # Notify programs that have requested notification
+  ( cd /var/run/netreport || exit
+    for i in * ; do
+      [ -f $i ] && \
+        kill -SIGIO $i >/dev/null 2>&1 || \
+          rm -f $i >/dev/null 2>&1
+    done
+  )
+}
+
+need_hostname()
+{
+    if [ "`hostname`" = "(none)" -o "`hostname`" = "localhost" -o \
+        "`hostname`" = "localhost.localdomain" ]; then
+       NEEDHOSTNAME=yes
+    else
+       unset NEEDHOSTNAME
+    fi
+}
+
+set_hostname()
+{
+    echo "$1" > /etc/HOSTNAME
+    hostname $1
+    if ! grep search /etc/resolv.conf; then
+       domain=`echo $1 | sed 's/^[^\.]*\.//'`
+       echo "search $domain" >> /etc/resolv.conf
+    fi
+}
+
+# PLD network functions
+# (C) 1999 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+# All functions must be called "name_of_function on" or "name_of_function off"
+
+ipv4_forwarding()
+{
+if [ "$IPV4_FORWARDING" != "default" -a -n "$IPV4_FORWARDING" ] || [ ! -e /proc/sys/net/ipv4/ip_forward ]; then
+
+if [ "$IPV4_FORWARDING" == "yes" ] && [ "$1" == "on" ]; then
+show Enabling IPv4 forwarding; busy
+if echo 1 > /proc/sys/net/ipv4/ip_forward; then deltext; ok; else deltext; fail; fi
+else
+show Disabling IPv4 forwarding ; busy
+if echo 0 > /proc/sys/net/ipv4/ip_forward; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_ign_all_icmp()
+{
+if [ "$IPV4_IGN_ALL_ICMP" != "default" -a -n "$IPV4_IGN_ALL_ICMP" ] || [ ! -e /proc/sys/net/ipv4/icmp_echo_ignore_all ]; then
+
+if [ "$IPV4_IGN_ALL_ICMP" == "yes" ] && [ "$1" == "on" ]; then
+show Ignoring ICMP echo to any addresses; busy
+if echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all; then deltext; ok; else deltext; fail; fi
+else
+show Allowing ICMP echo to any addresses; busy
+if echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_ign_bmcast_icmp()
+{
+if [ "$IPV4_IGN_BMCAST_ICMP" != "default" -a -n "$IPV4_IGN_BMCAST_ICMP" -a "$IPV4_IGN_ALL_ICMP" != "yes" ] || [ ! -e /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts ]; then
+
+if [ "$IPV4_IGN_BMCAST_ICMP" == "yes" ] && [ "$1" == "on" ]; then
+show Ignoring ICMP echo to multi and broadcast; busy
+if echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; then deltext; ok; else deltext; fail; fi
+else
+show Allowing ICMP echo to multi and broadcast; busy
+if echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+
+ipv4_no_mtu_discovery()
+{
+if [ "$IPV4_NO_MTU_DISCOVERY" != "default" -a -n "$IPV4_NO_MTU_DISCOVERY" ] || [ ! -e /proc/sys/net/ipv4/ip_no_pmtu_disc ]; then
+
+if [ "$IPV4_NO_MTU_DISCOVERY" == "yes" ] && [ "$1" == "on" ]; then
+show Disabling MTU Discovery Path; busy
+if echo 1 > /proc/sys/net/ipv4/ip_no_pmtu_disc; then deltext; ok; else deltext; fail; fi
+else
+show Enabling MTU Discovery Path; busy
+if echo 0 > /proc/sys/net/ipv4/ip_no_pmtu_disc; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_masq_debugging()
+{
+if [ "$IPV4_MASQ_DEBUGGING" != "default" -a -n "$IPV4_MASQ_DEBUGGING" ] || [ ! -e /proc/sys/net/ipv4/ip_masq_debug ]; then
+
+if [ "$IPV4_MASQ_DEBUGGING" == "yes" ] && [ "$1" == "on" ]; then
+show Enabling Masquerade Debug Mode; busy
+if echo 1 > /proc/sys/net/ipv4/ip_masq_debug; then deltext; ok; else deltext; fail; fi
+else
+show Disabling Masquerade Debug Mode; busy
+if echo 0 > /proc/sys/net/ipv4/ip_masq_debug; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_no_retrans_collapse()
+{
+if [ "$IPV4_NO_RETRANS_COLLAPSE" != "default" -a -n "$IPV4_NO_RETRANS_COLLAPSE" ] || [ ! -e /proc/sys/net/ipv4/tcp_retrans_collapse ]; then
+
+if [ "$IPV4_NO_RETRANS_COLLAPSE" == "yes" ] && [ "$1" == "on" ]; then
+show Turning off retrans collapse; busy
+if echo 0 > /proc/sys/net/ipv4/tcp_retrans_collapse; then deltext; ok; else deltext; fail; fi
+else
+show Turning on retrans collapse; busy
+if echo 1 > /proc/sys/net/ipv4/tcp_retrans_collapse; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_no_select_ack()
+{
+if [ "$IPV4_NO_SELECT_ACK" != "default" -a -n "$IPV4_NO_SELECT_ACK" ] || [ ! -e /proc/sys/net/ipv4/tcp_sack ]; then
+
+if [ "$IPV4_NO_SELECT_ACK" == "yes" ] && [ "$1" == "on" ]; then
+show Disabling select acknowledgments \(RFC2018\); busy
+if echo 0 > /proc/sys/net/ipv4/tcp_sack; then deltext; ok; else deltext; fail; fi
+else
+show Enabling select acknowledgments \(RFC2018\); busy
+if echo 1 > /proc/sys/net/ipv4/tcp_sack; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_no_timestamps()
+{
+if [ "$IPV4_NO_TIMESTAMPS" != "default" -a -n "$IPV4_NO_TIMESTAMPS" ] || [ ! -e /proc/sys/net/ipv4/tcp_timestamps ]; then
+
+if [ "$IPV4_NO_TIMESTAMPS" == "yes" ] && [ "$1" == "on" ]; then
+show Disabling timestamps \(RFC1323\); busy
+if echo 0 > /proc/sys/net/ipv4/tcp_timestamps; then deltext; ok; else deltext; fail; fi
+else
+show Enabling timestamps \(RFC1323\); busy
+if echo 1 > /proc/sys/net/ipv4/tcp_timestamps; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_rfc793()
+{
+if [ "$IPV4_RFC793" != "default" -a -n "$IPV4_RFC793" ] || [ ! -e /proc/sys/net/ipv4/tcp_stdurg ]; then
+
+if [ "$IPV4_RFC793" == "yes" ] && [ "$1" == "on" ]; then
+show Enabling strict interpretation of RFC793; busy
+if echo 1 > /proc/sys/net/ipv4/tcp_stdurg; then deltext; ok; else deltext; fail; fi
+else
+show Disabling strict interpretation of RFC793; busy
+if echo 0 > /proc/sys/net/ipv4/tcp_stdurg; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_syn_cookies()
+{
+if [ "$IPV4_SYN_COOKIES" != "default" -a -n "$IPV4_SYN_COOKIES" ] || [ ! -e /proc/sys/net/ipv4/tcp_syncookies ]; then
+
+if [ "$IPV4_SYN_COOKIES" == "yes" ] && [ "$1" == "on" ]; then
+show Enabling SYN Cookies; busy
+if echo 1 > /proc/sys/net/ipv4/tcp_syncookies; then deltext; ok; else deltext; fail; fi
+else
+show Disabling SYN Cookies; busy
+if echo 0 > /proc/sys/net/ipv4/tcp_syncookies; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_no_window_scaling()
+{
+if [ "$IPV4_NO_WINDOW_SCALING" != "default" -a -n "$IPV4_NO_WINDOW_SCALING" ] || [ ! -e /proc/sys/net/ipv4/tcp_window_scaling ]; then
+
+if [ "$IPV4_NO_WINDOW_SCALING" == "yes" ] && [ "$1" == "on" ]; then
+show Disabling window scaling \(RFC1323\); busy
+if echo 0 > /proc/sys/net/ipv4/tcp_window_scaling; then deltext; ok; else deltext; fail; fi
+else
+show Enabling window scaling \(RFC1323\); busy
+if echo 1 > /proc/sys/net/ipv4/tcp_window_scaling; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_dynamic_ip_patch()
+{
+if [ "$IPV4_DYNAMIC_IP_PATCH" != "default" -a -n "$IPV4_DYNAMIC_IP_PATCH" ] || [ ! -e /proc/sys/net/ipv4/ip_dynaddr ]; then
+
+case "$IPV4_DYNAMIC_IP_PATCH_VALUE" in
+       [1-9])  ;;
+       *)      IPV4_DYNAMIC_IP_PATCH_VALUE=7 ;;
+esac
+
+if [ "$IPV4_DYNAMIC_IP_PATCH" == "yes" ] && [ "$1" == "on" ]; then
+show Enabling dynamic IP patch; busy
+if echo $IPV4_DYNAMIC_IP_PATCH_VALUE > /proc/sys/net/ipv4/ip_dynaddr; then deltext; ok; else deltext; fail; fi
+else
+show Diabling dynamic IP patch; busy
+if echo 0 > /proc/sys/net/ipv4/ip_dynaddr; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_local_port_range()
+{
+if [ "$IPV4_LOCAL_PORT_RANGE" != "default" -a -n "$IPV4_LOCAL_PORT_RANGE" ] || [ ! -e /proc/sys/net/ipv4/ip_local_port_range ]; then
+
+if [ "$IPV4_LOCAL_PORT_RANGE" == "yes" ] && [ "$1" == "on" ]; then
+show Setting local port range; busy
+if echo "$IPV4_LOCAL_PORT_RANGE" > /proc/sys/net/ipv4/ip_local_port_range; then deltext; ok; else deltext; fail; fi
+else
+show Setting default local port range; busy
+if echo "1024 4999" > /proc/sys/net/ipv4/ip_local_port_range; then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+ipv4_anti_spoofing()
+{
+if [ "$IPV4_ANTI_SPOOFING" != "default" -a -n "$IPV4_ANTI_SPOOFING" ] || [ ! -e /proc/sys/net/ipv4/conf/all/rp_filter ]; then
+
+if [ "$IPV4_ANTI_SPOOFING" == "yes" ] && [ "$1" == "on" ]; then
+show Setting up IP spoofing protection; busy
+if (for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 1 > $f; done); then deltext; ok; else deltext; fail; fi
+else
+show Setting down IP spoofing protection; busy
+if (for f in /proc/sys/net/ipv4/conf/*/rp_filter; do echo 0 > $f; done); then deltext; ok; else deltext; fail; fi
+fi
+
+fi
+}
+
+
+# FUNCTIONS TO IMPLEMENT
+#ipv4_forwarding()
+#ipv4_accept_icmp_redir()
+#ipv4_accept_source_route()
+#ipv4_log_martians()
+#ipv4_multicast()
+#ipv4_proxy_arp()
+#ipv4_accept_icmp_redir_gate()
+#ipv4_send_icmp_redir()
+
index 0daec3d0d2a5c43f0dfcae0cfc28b431aa7647be..992acbf61c7884f714ca7af686846dcd384baee5 100644 (file)
@@ -9,17 +9,20 @@
 #              systems and then either halts or reboots.
 #
 # Author:       Grzegorz Stanislawski <stangrze@open.net.pl>
-#
+# Changes:     Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 
 # See how we were called.
+
+. /etc/rc.d/init.d/functions
+
 case "$1" in
   stop*)
        exit 0
        ;;
   start*)
        . /etc/rc.d/init.d/shutdwn
-        echo "The system is halted"
-       [ -f /fastboot ] && echo "On the next boot fsck will be skipped."
+        show "The system is halted"; ok
+       [ -f /fastboot ] && (show "On the next boot fsck will be skipped."; ok)
        eval halt -d
        ;;
 esac
index 0135bab8dd0f125069296b502e1dc65e3bdd2b97..3950daa97332feacee99b49dde71e39b6c2076b8 100644 (file)
 
 # Source function library.
 . /etc/rc.d/init.d/functions
+. /etc/rc.d/init.d/functions.network
 
-if [ ! -f /etc/sysconfig/network ]; then
-       NETWORKING="no"
-       exit 0
-fi
+[ ! -f /etc/sysconfig/network ] && exit 0
 
 . /etc/sysconfig/network
 
-if [ "${NETWORKING}" = "" ]; then
-       NETWORKING="no"
-fi
-
-if [ -f /etc/sysconfig/pcmcia ]; then
-       . /etc/sysconfig/pcmcia
-fi
-
-if [ -f /etc/sysconfig/network-ip6 ]; then
-       . /etc/sysconfig/network-ip6
-fi
-
-
 # Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
+[ "${NETWORKING}" = "no" -o "${NETWORKING}"="" ] && exit 0
 
 [ -x /sbin/ifconfig ] || exit 0
 
-# Load IPv6 module
-if [ "${IPV6NETWORKING}" = "yes" ]; then
-       if [ -r /lib/modules/`uname -r`/ipv6/ipv6.o ]; then
-       /sbin/modprobe net-pf-10
-       fi
-fi
-
-# Even if IPX is configured, without the utilities we can't do much
-[ ! -x /usr/bin/ipx_internal_net -o ! -x /usr/bin/ipx_configure ] && IPX=
-
-cd /etc/sysconfig/interfaces
-
-# find all the interfaces besides loopback.
-# ignore aliases, alternative configurations, and editor backup files
-interfaces=`ls -1 | egrep -v ':' | egrep -v '^(lo|data)$' | egrep '[a-z0-9]+$'`
-
-ipv4_forward_set ()
+######
+# initialize networking:
+# - check IPv4, IPv6, IPX can be handled by system
+# - setup default IPv{4,6} interfaces policy like:
+#   - forwarding,
+#   - spoofig protection,
+#   - icmp echo ignore broadcasts,
+# - setup lo interface
+network_init()
 {
-       # Turn IP forwarding on or off. We do this before bringing up the
-       # interfaces to make sure we don't forward when we shouldn't, and
-       # we do it even if networking isn't configured (why not?).
-       if [ -d /proc/sys/net/ipv4 ]; then
-           # people could have left this out of their kernel, which isn't
-           # exactly an error
-           if [ ! -f /proc/sys/net/ipv4/ip_forward ] ; then
-               echo "/proc/sys/net/ipv4/ip_forward is missing --" \
-                       "cannot control IP forwarding" >&2
-           else
-               if [ "$FORWARD_IPV4" = "no" -o "$FORWARD_IPV4" = "false" ]; then
-                   value=0
-                   message="Disabling IPv4 packet forwarding"
-               else
-                   value=1
-                   message="Enabling IPv4 packet forwarding"
-               fi
+[ -f /etc/sysconfig/interfaces/ifcfg-lo ] && /sbin/ifup lo boot
 
-               if [ $value != `cat /proc/sys/net/ipv4/ip_forward` ]; then
-                   show $message
-                   busy
-                   echo "$value" > /proc/sys/net/ipv4/ip_forward
-                   deltext; ok
-               fi
-           fi
-       fi
 }
 
-ipv4_spoofing_protection ()
- {
-        if [ -d /proc/sys/net/ipv4 ]; then
-            # people could have left this out of their kernel, which isn't
-            # exactly an error
-            if [ ! -f /proc/sys/net/ipv4/conf/all/rp_filter ] ; then
-                echo "/proc/sys/net/ipv4/conf/all/rp_filter is missing --" \
-                        "cannot control IP spoofing protection" >&2
-            else
-               if [ "$SPOOFING_IPV4" = "no" -o "$SPOOFING_IPV4" = "false" ]; then
-                    value=0
-                    message="Disabling IPv4 spoofing protection"
-                else
-                    value=1
-                    message="Enabling IPv4 spoofing protection"
-                fi
+######
+# deinitialize networking
+# - down lo interface.
+network_deinit()
+{
+[ -f /etc/sysconfig/interfaces/ifcfg-lo ] && /sbin/ifdown lo boot
 
-                if [ $value != `cat /proc/sys/net/ipv4/conf/all/rp_filter` ]; then
-                    show $message
-                    busy
-                   for f in /proc/sys/net/ipv4/conf/*/rp_filter; do
-                        echo $value > $f
-                   done
-                    deltext
-                    ok
-                fi
-            fi
-       fi
 }
 
-ipv4_icmp_echo_ignore_broadcasts ()
-{
-        if [ -d /proc/sys/net/ipv4 ]; then
-            # people could have left this out of their kernel, which isn't
-            # exactly an error
-            if [ ! -f /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts ] ; then
-                echo "/proc/sys/net/ipv4/icmp_echo_ignore_broadcasts is missing --" \
-                        "cannot control IP ignoring icmp to broadcasts" >&2
-            else
-                if [ "$IGNORE_ICMP_BCAST_IPV4" = "no" -o "$IGNORE_ICMP_BCAST_IPV4" = "false" ]; then
-                    value=0
-                    message="Disabling IPv4 ign icmp_echo to our bcasts"
-                else
-                    value=1
-                    message="Enabling IPv4 ign icmp_echo to our bcasts"
-                fi
-
-                if [ $value != `cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts` ]; then
-                    show $message
-                    busy
-                    echo "$value" > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
-                    deltext
-                    ok
-                fi
-            fi
-       fi
- }
+interfaces="`ls -1 /etc/sysconfig/interfaces/ifcfg-* | grep -v ifcfg-lo | xargs 2> /dev/null`"
 
 # See how we were called.
 case "$1" in
   start)
-       ipv4_forward_set
-       ipv4_icmp_echo_ignore_broadcasts
-
-       /sbin/ifup lo
-
-       case "$IPX" in
-         yes|true)
-           /usr/bin/ipx_configure --auto_primary=$IPXAUTOPRIMARY \
-                                  --auto_interface=$IPXAUTOFRAME
-           /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM $IPXINTERNALNODENUM
-           ;;
-       esac
-
+       network_init
        for i in $interfaces; do
                [ -f $i ] && /sbin/ifup $i boot
        done
-
-       ipv4_spoofing_protection
-
         touch /var/lock/subsys/network
         ;;
   stop)
-       SPOOFING_IPV4=no
-       ipv4_spoofing_protection
-
        for i in $interfaces; do
                [ -f $i ] && /sbin/ifdown $i boot
        done
-       case "$IPX" in
-         yes|true)
-           /usr/bin/ipx_internal_net del
-           ;;
-       esac
-       /sbin/ifdown lo
-       show "Disabling IPv4 packet forwarding"
-       busy
-       echo 0 > /proc/sys/net/ipv4/ip_forward
-       deltext; ok
-
-       IGNORE_ICMP_BCAST_IPV4=no
-       ipv4_icmp_echo_ignore_broadcasts
-
+       network_deinit
         rm -f /var/lock/subsys/network
         ;;
   status)
index 6441a6ef4960ee4c418b938e3bffb9d05da1b052..22803bf123f88cbcba8608c1afe90a3feb6bb689 100755 (executable)
@@ -9,17 +9,21 @@
 #              systems and then either halts or reboots.
 #
 # Author:       Grzegorz Stanislawski <stangrze@open.net.pl>
+# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
 # See how we were called.
+
+. /etc/rc.d/init.d/functions
+
 case "$1" in
   stop*)
        exit 0
        ;;
   start*)
        . /etc/rc.d/init.d/shutdwn
-       echo "Please stand by while rebooting the system..."
-       [ -f /fastboot ] && echo "On the next boot fsck will be skipped."
+       show "Please stand by while rebooting the system "; ok
+       [ -f /fastboot ] && (show "On the next boot fsck will be skipped."; ok)
        eval reboot -d
        ;;
 esac
index aa961dbc497b7a43e909598b0180d7bca4f6201e..ab740493877aaaf901a6ad84135dcbb4e238e67a 100755 (executable)
@@ -4,37 +4,47 @@
 #
 # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 #               Modified for PLD Linux by Grzegorz Stanislawski
+# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
 # Set the path.
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
 
+. /etc/rc.d/init.d/functions
+
 # Kill all processes.
 [ "${BASH+bash}" = bash ] && enable kill
 
-echo "Sending all processes the TERM signal..."
-kill -15 -1
+show "Sending all processes the TERM signal "
+daemon killall5 -15
 sleep 5
-echo "Sending all processes the KILL signal.."
-kill -9 -1
+show "Sending all processes the KILL signal "
+daemon killall5 -9
 
 # Write to wtmp file before unmounting /var
 halt -w
 
 # Turn off swap, then unmount file systems.
-echo "Turning off swap and accounting"
-swapoff -a
+show "Turning off swap and accounting"
+daemon swapoff -a
 [ -x /sbin/accton ] && /sbin/accton
-echo "Unmounting file systems"
-umount -a
-mount -n -o remount,ro /
+show "Unmounting file systems"; busy
+if ( umount -a; mount -n -o remount,ro / ); then
+deltext; ok
+else
+deltext; fail
+fi
 
 # turn off raid
 if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
     /sbin/raidstop -a
 fi
 
-echo "Remounting remaining filesystems (if any) readonly"
-mount | awk '/ext2/ { print $3 }' | while read line; do
+show "Remounting remaining filesystems ro mode"; busy
+if (mount | awk '/ext2/ { print $3 }' | while read line; do 
     mount -n -o ro,remount $line
-done
+done); then
+deltext; ok
+else
+deltext; fail
+fi
index f31b06c1d3c493a4d571d6d2dceb00449a68aad1..790a74d94465233eb43d20a16944f024d79a22c6 100644 (file)
 #
 # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 #               Modified for PLD Linux by Grzegorz Stanislawski
+# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
 # Set the path.
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
 
+. /etc/rc.d/init.d/functions
+
 case "$1" in
    stop*)
        exit 0
@@ -23,22 +26,37 @@ case "$1" in
 # Kill all processes.
        [ "${BASH+bash}" = bash ] && enable kill
 
-       echo "Sending all processes the TERM signal..."
-       kill -15 -1
+       show "Sending all processes the TERM signal "
+       daemon killall5 -15
        sleep 5
-       echo "Sending all processes the KILL signal.."
-       kill -9 -1
+       show "Sending all processes the KILL signal "
+       daemon killall5 -9
 
        rm -f /var/lock/subsys/*
 
        # this looks nices
        [ -x /usr/bin/clear ] && /usr/bin/clear
 
-       ## we just killed kerneld :-(
-       #/etc/rc.d/init.d/kerneld start
+# make sure modprobe is working
+if [ -f /proc/sys/kernel/modprobe ]; then
+   echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
+fi
+
+# If they want to run something in single user mode, might as well run it...
+for i in /etc/rc.d/rc1.d/S[0-9][0-9]*; do
+        # Check if the script is there.
+        [ ! -f $i ] && continue
+
+       # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
+       [ "${i%.rpmsave}" != "${i}" ] && continue
+       [ "${i%.rpmorig}" != "${i}" ] && continue
+       [ "${i%.rpmnew}" != "${i}" ] && continue
+       [ "$i" = "/etc/rc.d/rc1.d/S00single" ] && continue
+       $i start
+done
 
        # Now go to the single user level.
-       echo "Telling INIT to go to single user mode."
+       show "Telling INIT to go to single user mode."; ok
        exec init -t1 S
        ;;
 esac
diff --git a/rc.d/rc b/rc.d/rc
index a1194c37e5268c9a10c8350b509d53850af2a0a2..09dd0f0ff68a4d6da49bd094deacb5506f1e4f4b 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -7,6 +7,7 @@
 #
 # Original Author:       
 #               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
+# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
 # Source function library.
@@ -19,12 +20,32 @@ runlevel=$2
 previous=$1
 export runlevel previous
 
+# if runlevel is 0 (halt) or 6 (reboot) change to first
+# virtual console
+if [ "$runlevel" == "0" ] || [ "$runlevel" == "6" ]; then
+       exec 0<> /dev/tty1 1>&0 2>&0
+       [ -x /usr/bin/chvt ] && /usr/bin/chvt 1 && echo
+else
+# if previous runlevel == current runlevel do nothing
+       [ "$runlevel" == "$previous" ] && exit 0
+fi
+
+# set onlcr to avoid staircase effect and do not lock scrolling
+stty onlcr -ixon 0>&1
+
 # Get first argument. Set new runlevel to this argument.
 [ "$1" != "" ] && runlevel="$argv1"
 
 # Tell linuxconf what runlevel we are in
 [ -d /var/run ] && echo "/etc/rc.d/rc$runlevel.d" > /var/run/runlevel.dir
 
+
+# Say something ;)
+echo "`tput setaf 2`Resource Manager:`tput setaf 7` Leaving  runlevel number \
+.....`tput setaf 6`[`tput setaf 2` $previous `tput setaf 6`]`tput setaf 7`"
+echo "`tput setaf 2`Resource Manager:`tput setaf 7` Entering runlevel number \
+.....`tput setaf 6`[`tput setaf 2` $runlevel `tput setaf 6`]`tput setaf 7`"
+
 # Is there an rc directory for this new runlevel?
 if [ -d /etc/rc.d/rc$runlevel.d ]; then
        # First, run the KILL scripts.
@@ -32,9 +53,10 @@ if [ -d /etc/rc.d/rc$runlevel.d ]; then
                # Check if the script is there.
                [ ! -f $i ] && continue
 
-               # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
+               # Don't run [KS]??foo.{rpmsave,rpmorig,rpmnew} scripts
                [ "${1%.rpmsave}" != "${1}" ] && continue
                [ "${1%.rpmorig}" != "${1}" ] && continue
+               [ "${1%.rpmnew}" != "${1}" ] && continue
 
                # Check if the subsystem is already up.
                subsys=${i#/etc/rc.d/rc$runlevel.d/K??}
@@ -53,6 +75,7 @@ if [ -d /etc/rc.d/rc$runlevel.d ]; then
                # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
                [ "${1%.rpmsave}" != "${1}" ] && continue
                [ "${1%.rpmorig}" != "${1}" ] && continue
+               [ "${1%.rpmnew}" != "${1}" ] && continue
 
                # Check if the subsystem is already up.
                subsys=${i#/etc/rc.d/rc$runlevel.d/S??}
@@ -63,3 +86,13 @@ if [ -d /etc/rc.d/rc$runlevel.d ]; then
                $i start
        done
 fi
+
+# Say something ;)
+echo "`tput setaf 2`Resource Manager:`tput setaf 7` Runlevel has been \
+reached.....`tput setaf 6`[`tput setaf 2` $runlevel `tput setaf 6`]`tput setaf 7`"
+
+if [ -f /etc/nologin.boot ]
+then
+   rm -f /etc/nologin /etc/nologin.boot
+fi
+       
index 5176cbaab7e767c01fc16602ee64e4f16d06934d..54f8523264013995a40ff4fb49e48ee2acf539a8 100755 (executable)
@@ -1,5 +1,7 @@
 #!/bin/sh
 #
+# Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
 # Setting serial ports. This will work only if you have setserial package installed.
 #
 # Format of /etc/sysconfig/serial:
@@ -15,12 +17,22 @@ SETSERIAL=/bin/setserial
 
 ALLDEVS="/dev/ttyS*"
 
-echo "Setting serial ports:"
-if test -f /etc/sysconfig/serial ; then
-       grep -v ^# < /etc/sysconfig/serial | grep "/dev/" | while read device args
+show "Setting serial ports "; started
+if test -f /etc/sysconfig/serial ; then 
+       grep -v "^#" < /etc/sysconfig/serial | grep "/dev/" | while read device args; 
        do
-           ${SETSERIAL} -z $device $args
-       done 
-fi
+       ${SETSERIAL} -z $device $args
+       done
+fi 
+
+for a in ${ALLDEVS}; do
+       WHAT="`${SETSERIAL} -bg $a`"
+       if (echo $WHAT | grep -q " at "); then
+               if [ -x /usr/bin/cut ]; then
+                       show "`echo $WHAT | cut -d"/" -f3`"; ok
+               else
+                       show "$WHAT"; ok
+               fi
+       fi
+done
 
-${SETSERIAL} -bg ${ALLDEVS}
index 6e99597c9960eecf1b3183054b3ba23811410704..0399f5bb48536dd39d25faefd9b0a65b1c86178a 100755 (executable)
@@ -3,11 +3,15 @@
 # /etc/rc.d/rc.sysinit - run once at boot time
 #
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
+# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
 # Set the path
 PATH=/bin:/sbin:/usr/bin:/usr/sbin
 export PATH
+# Read functions
+
+. /etc/rc.d/init.d/functions
 
 # Read network config data.
 if [ -f /etc/sysconfig/network ]; then
@@ -22,15 +26,19 @@ if [ -f /etc/sysconfig/system ]; then
     . /etc/sysconfig/system
 else
     RUN_SULOGIN_ON_ERR=yes
+    RUN_ISAPNP=yes
+    PANIC_REBOOT_TIME=0
+    DELAY_LOGIN=yes
+    CLEAN_TMP=no
 fi
 
 # Start up swapping.
-echo "Activating swap partitions"
+show "Activating swap partitions"; ok
 swapon -a
 
 # Set the hostname.
 hostname ${HOSTNAME}
-echo hostname: `hostname`
+echo "Setting hostname: `tput bold``hostname``tput sgr0`"
 
 # Set the NIS domain name
 if [ -n "$NISDOMAIN" ]; then
@@ -46,7 +54,7 @@ if [ -f /fsckoptions ]; then
 fi
 
 if [ ! -f /fastboot ]; then
-       echo "Checking root filesystems."
+       show "Checking root filesystems."; started
        fsck -V -a $fsckoptions /
 
        rc=$?
@@ -69,17 +77,17 @@ if [ ! -f /fastboot ]; then
                echo "Unmounting file systems"
                umount -a
                mount -n -o remount,ro /
-               echo "Automatic reboot in progress."
-               reboot
+               show "Automatic reboot in progress."; busy
+               if reboot; then deltext; ok; else deltext; fail; fi
        elif [ "$rc" = "1" -a -x /sbin/quotacheck ]; then
-               echo "Checking root filesystem quotas"
-               /sbin/quotacheck -v /
+               show "Checking root filesystem quotas"; busy
+               if (/sbin/quotacheck -v /); then deltext; ok; else deltext; fail; fi
        fi
 fi
 
 if [ -x /sbin/quotaon ]; then
-    echo "Turning on user and group quotas for root filesystem"
-    /sbin/quotaon /
+    show "Turning on quotas on root filesystem"; busy
+    if (/sbin/quotaon /); then deltext; ok; else deltext; fail; fi
 fi
 
 # check for arguments 
@@ -93,22 +101,36 @@ fi
 
 # set up pnp 
 if [ -x /sbin/isapnp -a -f /etc/isapnp/isapnp.conf ]; then
-    if [ -n "$PNP" ]; then
-       echo "Setting up ISA PNP devices"
-       /sbin/isapnp /etc/isapnp/isapnp.conf
+    if [ -n "$PNP" ] && [ "$RUN_ISAPNP" == "yes" ]; then
+       show "Setting up ISA PNP devices"; busy
+       if _OUTPUT="`/sbin/isapnp /etc/isapnp/isapnp.conf 2>&1`"; then
+       deltext; ok
+       echo $_OUTPUT
+       else
+       deltext; fail
+       echo $_OUTPUT
+       fi
     else
-       echo "Skipping ISA PNP configuration at users request"
+       show "Skipping ISA PNP configuration at users request"; ok
     fi
 fi
 
-# setup media type dependent parameters
-if [ -f /etc/rc.d/rc.media ]; then
-       . /etc/rc.d/rc.media
+# Remount the root filesystem read-write.
+show "Remounting root filesystem in rw mode"; busy
+if (mount -n -o remount,rw /); then deltext; ok; else deltext; fail; fi
+
+# /etc/nologin when starting system
+if [ "$DELAY_LOGIN" == "yes" ] && [ ! -f /etc/nologin ]; then
+  show "Enabling Delay Login"; busy
+  echo > /etc/nologin
+  echo "[EN] System bootup in progress  - please wait" >> /etc/nologin
+  echo "[PL] Startowanie systemu w toku - proszê czekaæ" >> /etc/nologin
+  echo >> /etc/nologin
+  chmod 644 /etc/nologin
+  cp -fp /etc/nologin /etc/nologin.boot
+  deltext; ok
 fi
 
-# Remount the root filesystem read-write.
-echo "Remounting root filesystem in read-write mode."
-mount -n -o remount,rw /
 
 # Clear mtab
 >/etc/mtab
@@ -127,9 +149,9 @@ fi
 rm -f /lib/modules/preferred
 if [ -n "$USEMODULES" ]; then
     ktag="`cat /proc/version`"
-    mtag=`grep -l "$ktag" /lib/modules/*/.rhkmvtag` 2> /dev/null
+    mtag="`grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null`"
     if [ -n "$mtag" ]; then
-       mver=`echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' -e 's,[       ].*$,,'`
+       mver="`echo $mtag | sed -e 's,/lib/modules/,,' -e 's,/.rhkmvtag,,' -e 's,[      ].*$,,'`"
        ln -sf /lib/modules/$mver /lib/modules/preferred
        ln -sf /boot/System.map-$mver /boot/System.map
        ln -sf /boot/module-info-$mver /boot/module-info
@@ -138,13 +160,12 @@ fi
 
 if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
     # Get ready for kerneld if module support in the kernel
-    echo -n "Finding module dependencies... "
+    show "Finding module dependencies... "; busy
     if [ -e /lib/modules/preferred ]; then
-       depmod -a preferred
+       if depmod -a preferred; then deltext; ok; else deltext; fail; fi
     else
-       depmod -a
+       if depmod -a; then deltext; ok; else deltext; fail; fi
     fi
-    echo "done"
 fi
 
 # load sound modules
@@ -166,7 +187,7 @@ fi
 
 # Add raid devices
 if [ -f /proc/mdstat -a -f /etc/raidtab -a -x /sbin/raidadd ]; then
-       echo "Starting up RAID devices."
+       show "Starting up RAID devices."; started
        raidadd -a
 
        rc=$?
@@ -191,17 +212,17 @@ if [ -f /proc/mdstat -a -f /etc/raidtab -a -x /sbin/raidadd ]; then
                        /bin/sh
                fi
 
-               echo "Unmounting file systems"
-               umount -a
-               mount -n -o remount,ro /
-               echo "Automatic reboot in progress."
-               reboot
+               show "Unmounting file systems"; busy
+               if (umount -a;  mount -n -o remount,ro /); then
+               deltext; ok; else deltext; fail; fi
+               show "Automatic reboot in progress."; busy
+               if reboot; then deltext; ok; else deltext; fail; fi
        fi
 fi
 
 # Check filesystems
 if [ ! -f /fastboot ]; then
-       echo "Checking filesystems."
+       show "Checking filesystems."; started
        fsck -R -A -V -a $fsckoptions
 
        rc=$?
@@ -221,36 +242,48 @@ if [ ! -f /fastboot ]; then
                        /bin/sh
                fi
 
-               echo "Unmounting file systems"
-               umount -a
-               mount -n -o remount,ro /
-               echo "Automatic reboot in progress."
-               reboot
+               show "Unmounting file systems"; busy
+               if (umount -a;  mount -n -o remount,ro /); then deltext; ok; else deltext; fail; fi
+               show "Automatic reboot in progress."; busy
+               if reboot; then deltext; ok; else deltext; fail; fi
        elif [ "$rc" = "1" -a -x /sbin/quotacheck ]; then
-               echo "Checking filesystem quotas"
-               /sbin/quotacheck -v -R -a
+               show "Checking filesystem quotas"; busy
+               if (/sbin/quotacheck -v -R -a); then deltext; ok; else deltext; fail; fi
        fi
 fi
 
 # Mount all other filesystems (except for NFS and /proc, which is already
 # mounted). Contrary to standard usage,
 # filesystems are NOT unmounted in single user mode.
-echo "Mounting local filesystems."
-mount -a -t nonfs,proc
+show "Mounting local filesystems."; busy
+if (mount -a -t nonfs,proc); then deltext; ok; else deltext; fail; fi
 
 # set the console font
 if [ -x /sbin/setsysfont ]; then
-    /sbin/setsysfont
+    show "Loading default system font"; busy
+    if (/sbin/setsysfont > /dev/null 2>&1); then deltext; ok; else deltext; fail; fi
 fi
 
 if [ -x /sbin/quotaon ]; then
-    echo "Turning on user and group quotas for local filesystems"
-    /sbin/quotaon -a
+    show "Turning on quotas for local filesystems"; busy
+    if (/sbin/quotaon -a); then deltext; ok; else deltext; fail; fi
 fi
 
-# Clean out /etc.
+# Clean out /etc & /var/{run/*,log/{b,w}tmpx}}.
 rm -f /etc/mtab~ /fastboot /fsckoptions
->/var/run/utmp
+rm -f /var/run/utmp  
+:>/var/run/utmpx
+chown root.utmpx /var/run/utmpx
+chmod 664 /var/run/utmpx
+
+# Uncomment if you planing to run `utmpd'
+#:>/var/log/wtmp
+#:>/var/run/utmp
+
+# Clean /tmp
+if [ "$CLEAN_TMP" == "yes" ]; then
+rm -rf /tmp/*
+fi
 
 # Delete UUCP lock files.
 rm -f /var/lock/LCK*
@@ -269,7 +302,7 @@ rm -f /tmp/.X*-lock
 rm -f /tmp/.s.PGSQL.*
 
 # Set the system clock.
-echo -n "Setting clock"
+show "Setting clock"; busy
 
 ARC=0
 UTC=0
@@ -295,25 +328,26 @@ fi
 case "$UTC" in
   yes|true)
     CLOCKFLAGS="$CLOCKFLAGS -u";
-    echo -n " (utc)"
+#    echo -n " (utc)"
   ;;
 esac
 
 case "$ARC" in
   yes|true)
     CLOCKFLAGS="$CLOCKFLAGS -A";
-    echo -n " (arc)"
+#   echo -n " (arc)"
   ;;
 esac
 
-echo -n ": "
-$CLOCK $CLOCKFLAGS
+#echo -n ": "
+if ($CLOCK $CLOCKFLAGS); then deltext; ok; else deltext; fail; fi
 
-date
+show "Date set to `date`"; ok
 
 # Right, now turn on swap in case we swap to files.
-echo "Enabling swap space."
-swapon -a 2>&1 | grep -v "busy"
+show "Enabling swap space."; busy
+if [ "`LANG=C swapon -a 2>&1 | grep -v "busy"`" == "" ]; then
+deltext; ok; else deltext; fail; fi
 
 # Initialize the serial ports.
 if [ -f /etc/rc.d/rc.serial ]; then
@@ -336,6 +370,23 @@ if [ -f /proc/scsi/scsi ] && cat /proc/scsi/scsi | grep -q 'Type:   Sequential-A
        fi
 fi
 
+# there could be a new kernel version.  reinit /etc/psdevtab, to be sure.
+rm -f /etc/psdevtab
+#if [ -x /bin/ps ]; then
+#show "Rebuilding /etc/psdevtab database"; busy
+#if (ps > /dev/null 2>&1); then deltext; ok; else deltext; fail; fi
+#fi
+
+if [ -x /sbin/ldconfig ]; then
+show "Setting up /etc/ld.so.cache"; busy
+if (/sbin/ldconfig -X); then deltext; ok; else deltext; fail; fi
+fi
+
+if ([ -f /proc/sys/kernel/panic ] && [ "$PANIC_REBOOT_TIME" -gt "0" ] 2>/dev/null); then
+show "Sending val. $PANIC_REBOOT_TIME to /proc/sys/kernel/panic"; busy
+if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then deltext; ok; else deltext; fail; fi
+fi
+
 # Now that we have all of our basic modules loaded and the kernel going,
 # let's dump the syslog ring somewhere so we can find it later
 dmesg > /var/log/dmesg
@@ -343,3 +394,4 @@ chmod 640 /var/log/dmesg
 
 # Feed entropy into the entropy pool
 /etc/rc.d/init.d/random start
+
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644 (file)
index 0000000..6572dee
--- /dev/null
@@ -0,0 +1,21 @@
+@SET_MAKE@
+
+bin_PROGRAMS = \
+       doexec \
+       ipcalc \
+       usleep
+
+sbin_PROGRAMS =        \
+       netreport \
+       usernetctl 
+       
+EXTRA_PROGRAMS = \
+       testd 
+       
+doexec_SOURCES = doexec.c
+ipcalc_SOURCES = ipcalc.c
+ipcalc_LDADD = -lpopt
+netreport_SOURCES = netreport.c
+testd_SOURCES = testd.c
+usernetctl_SOURCES = usernetctl.c
+usleep_SOURCES = usleep.c
diff --git a/sysconfig/Makefile.am b/sysconfig/Makefile.am
new file mode 100644 (file)
index 0000000..843d980
--- /dev/null
@@ -0,0 +1,12 @@
+@SET_MAKE@
+
+SUBDIRS = network-scripts
+
+sysconfigdir = @sysconfigdir@
+
+sysconfig_DATA = \
+       system \
+       network \
+       static-routes
+
+EXTRA_DIST = $(sysconfig_DATA)
diff --git a/sysconfig/interfaces/ifcfg-lo b/sysconfig/interfaces/ifcfg-lo
new file mode 100644 (file)
index 0000000..e21fb29
--- /dev/null
@@ -0,0 +1,6 @@
+DEVICE=lo
+IPADDR=127.0.0.1
+NETMASK=255.0.0.0
+NETWORK=127.0.0.0
+BROADCAST=127.255.255.255
+ONBOOT=yes
diff --git a/sysconfig/interfaces/ifcfg-ppp0.callback b/sysconfig/interfaces/ifcfg-ppp0.callback
new file mode 100644 (file)
index 0000000..f93fa91
--- /dev/null
@@ -0,0 +1,25 @@
+DEVICE=ppp0
+CHATSCRIPT=/etc/sysconfig/network-scripts/chat-ppp0.callback
+ONBOOT=no
+HARDFLOWCTL=yes
+MODEMPORT=/dev/ttyS1
+LINESPEED=115200
+DEBUG=yes
+PERSIST=no
+HOLDOFF=10
+#demand option not finished yet ;-(
+DEMAND=no
+#ACTIVEFILTER=
+#IDLE=
+PHONE=phone
+INITSTRING=ATe0s2=255
+#CBPASSWORD and CBPHONE is ysed (by me) in callback. 
+#see included chat-ppp0 for example of
+#"modem level" callback (on USRobotics Courier)
+CBPASSWORD=cbpassword
+CBPHONE=myphone
+USER=user
+PASSWORD=password
+DATAFORCHAT="CBPASSWORD CBPHONE PHONE USER PASSWORD INITSTRING"
+
+REPORTFILE=/var/log/ppp0.log
diff --git a/sysconfig/interfaces/ifcfg-ppp0.leased1 b/sysconfig/interfaces/ifcfg-ppp0.leased1
new file mode 100644 (file)
index 0000000..62aed0a
--- /dev/null
@@ -0,0 +1,30 @@
+# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
+# config file for setting up hardwired (leased) serial line.
+#  This configuration uses chats with modem, so You have to have an inteligent
+# modem (AT commands compatible).
+# But You can monitor connection speed.
+DEVICE=ppp0
+CHATSCRIPT=/etc/sysconfig/network-scripts/chat-ppp0.leased1
+ONBOOT=yes
+IPADDR=192.168.255.254
+REMIP=192.168.255.253
+NETMASK=255.255.255.252
+HARDFLOWCTL=yes
+MODEMPORT=/dev/ttyS1
+LINESPEED=115200
+DEBUG=no
+PERSIST=yes
+HOLDOFF=10
+#demand option not finished yet ;-(
+DEMAND=no
+#ACTIVEFILTER=
+#IDLE=
+# one end is "calling"
+INITSTRING="ATs0=0&l1"
+# while other is "receiving"
+#INITSTRING="ATs0=1&l1"
+#if your modem doesn't support AT&L1 command try with ATD on one side 
+#and ATA on the other. 
+DATAFORCHAT="INITSTRING"
+
+REPORTFILE=/var/log/ppp0.log
diff --git a/sysconfig/interfaces/ifcfg-ppp0.leased2 b/sysconfig/interfaces/ifcfg-ppp0.leased2
new file mode 100644 (file)
index 0000000..1e1f944
--- /dev/null
@@ -0,0 +1,29 @@
+# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
+# config file for setting up hardwired (leased) serial line.
+#  This config assumes "transparent" modem (in ex. goramo), null modem
+# cable or current loop. 
+# Advantage is smaller logfiles and slower 'pid spinning' (no chat is
+# executed)
+# You can configure Your AT Hayes compatibile modem to transparent mode
+# using ATS0=0&L1&S5&W on master "calling" side and ATS0=1&L1&S5&W on
+# slave "reciving" side 
+# Note: After commiting last &W You won't be able to talk to Your modem 
+# until You reset it to factory defaults using some jumper.
+# if You don't have any jumper YOU HAVE BEEN WARNED. 
+DEVICE=ppp0
+ONBOOT=yes
+IPADDR=192.168.255.254
+REMIP=192.168.255.253
+NETMASK=255.255.255.252
+HARDFLOWCTL=yes
+MODEMPORT=/dev/ttyS1
+LINESPEED=115200
+DEBUG=no
+PERSIST=yes
+HOLDOFF=10
+#demand option not finished yet ;-(
+DEMAND=no
+#ACTIVEFILTER=
+#IDLE=
+
+REPORTFILE=/var/log/ppp0.log
diff --git a/sysconfig/interfaces/ifcfg-ppp0.tpsa b/sysconfig/interfaces/ifcfg-ppp0.tpsa
new file mode 100644 (file)
index 0000000..a9e2483
--- /dev/null
@@ -0,0 +1,20 @@
+DEVICE=ppp0
+CHATSCRIPT=/etc/sysconfig/network-scripts/chat-ppp0.tpsa
+ONBOOT=no
+HARDFLOWCTL=yes
+MODEMPORT=/dev/ttyS1
+LINESPEED=115200
+DEBUG=yes
+PERSIST=no
+HOLDOFF=10
+#demand option not finished yet ;-(
+DEMAND=no
+#ACTIVEFILTER=
+#IDLE=
+PHONE=0w202122
+USER=ppp
+PASSWORD=ppp
+INITSTRING=ATe0s2=255
+DATAFORCHAT="USER PASSWORD INITSTRING"
+
+REPORTFILE=/var/log/ppp0.log
index eab754bb82eada2d31ab6c4c462a7bd1120f6e82..1ed2968ea4afabf9fb6b322e367c1aecc35322b0 100644 (file)
+# Do you need networking ?
 NETWORKING=yes
-IPV6NETWORKING=no
-FORWARD_IPV4=no
+
+# Do you need IPv6 networking, too ?
+IPV6_NETWORKING=no
+
+# Do you want enable IPv4 forwarding ?
+IPV4_FORWARDING=no
+
+# Set hostname here (only hostname)
 HOSTNAME=pldmachine
-NISDOMAIN=
 
-SPOOFING_IPV4=
+# Set domainname here
+NISDOMAIN=
 
-IGNORE_ICMP_BCAST_IP=
 GATEWAY=
 GATEWAYDEV=
 
+
+# Do you want to use IPX networking ?
 IPX=no
 IPXAUTOPRIMARY=
 IPXAUTOFRAME=
 IPXINTERNALNETNUM=
 IPXINTERNALNODENUM=
+
+######################################################################
+# IPv4 goodies
+
+# Do you want to enable IPv4 anti spoofing ?
+IPV4_ANTI_SPOOFING=
+
+# Kernel should accept ICMP redirect messages ?
+# The default is 'yes', if the kernel is configured for
+# a regular host; and 'no' for a router configuration.
+IPV4_ACCEPT_ICMP_REDIR=
+
+# Kernel should accept source routed packets ?
+# The default Is 'yes' for routers and 'no' for hosts.
+IPV4_ACCEPT_SOURCE_ROUTE=
+
+# Log packets with source addresses with no known route to kernel log ?
+IPV4_LOG_MARTIANS=
+
+# Do multicast routing ? The kernel needs to be compiled with
+# CONFIG_MROUTE and a multicast routing daemon is required.
+IPV4_MULTICAST=
+
+# Do proxy ARP ?
+IPV4_PROXY_ARP=
+
+# Accept ICMP redirect messages only for gateways, listed in
+# default gateway list ?
+IPV4_ACCEPT_ICMP_REDIR_GATE=
+
+# Send ICMP redirects to other hosts ?
+IPV4_SEND_ICMP_REDIR=
+
+# Ignore all ICMP echo requests ? 
+IPV4_IGN_ALL_ICMP=
+
+# Ignore ICMP echo requests to broadcast and multicast addresses ?
+IPV4_IGN_CAST_ICMP=
+
+# Enable MTU discovery patch ? (KERNEL MUST SUPPORT THIS)
+# MTU (maximal transfer unit) is the size of the chunks we send out
+# over the net. "Path MTU Discovery" means that, instead of always
+# sending very small chunks, we start out sending big ones and if we
+# then discover that some host along the way likes its chunks smaller,
+# we adjust to a smaller size.
+IPV4_MTU_DISCOVERY=
+
+# Enable debugging of IP masquerading ?
+IPV4_MASQ_DEBUGGING=
+
+# Bug-to-bug compatibility with some broken printers. On retransmit
+# try to send bigger packets to work around bugs in certain TCP
+# stacks. Can be turned off by setting it to zero. 
+IPV4_RETRANS_COLLAPSE=
+        
+# Disable select acknowledgments after RFC2018 ?
+# TCP may experience poor performance when multiple packets are lost
+# from one window of data. With the limited information available
+# from cumulative acknowledgments, a TCP sender can only learn about a
+# single lost packet per round trip time. An aggressive sender could
+# choose to retransmit packets early, but such retransmitted segments
+# may have already been successfully received.
+IPV4_NO_SELECT_ACK=
+
+# Disable timestamps as defined in RFC1323 ?
+# Timestamps are designed to provide compatible interworking with
+# TCP's that do not implement the TCP Extensions for High Performance
+IPV4_NO_TIMESTAMPS=
+
+# Enable the strict RFC793 interpretation of the TCP urgent pointer field.
+IPV4_RFC793=
+
+# Enable SYN flood protection ?
+IPV4_SYN_COOKIES=
+
+# Disable window scaling as defined in RFC1323 ?
+# The window scale extension expands the definition of the TCP
+# window to 32 bits and then uses a scale factor to carry this
+# 32-bit value in the 16-bit Window field of the TCP header.
+IPV4_NO_WINDOW_SCALING=
+
+# Enable dynamic socket address rewriting on interface address change.
+# This is useful for dialup interface with changing IP addresses.
+# (default no)
+# IPV4_DYNAMIC_IP_PATCH_VALUE - value from 1 to 9
+IPV4_DYNAMIC_IP_PATCH=
+IPV4_DYNAMIC_IP_PATCH_VALUE=
+
+# Range of ports used by TCP and UDP to choose the local
+# port. Contains two numbers, the first number is the lowest port,
+# the second number the highest local port. Default is "1024 4999".
+# Should be changed to "32768 61000" for high-usage systems.
+IPV4_LOCAL_PORT_RANGE="1024 4999"
+
diff --git a/sysconfig/network-scripts/Makefile.am b/sysconfig/network-scripts/Makefile.am
new file mode 100644 (file)
index 0000000..d922ade
--- /dev/null
@@ -0,0 +1,34 @@
+@SET_MAKE@
+
+libdir = @libdir@
+
+sbin_SCRIPTS = \
+       ifdhcpc-done \
+       ifdown \
+       ifdown-ppp \
+       ifdown-sl \
+       ifup \
+       ifup-aliases \
+       ifup-ipx \
+       ifup-plip \
+       ifup-post \
+       ifup-ppp \
+       ifup-routes \
+       ifup-sl 
+
+#      ifdown-tunnel \
+#      ifup-tunnel \
+#      ifdown-post 
+
+lib_DATA = network-functions
+
+
+#SUBDIRS = data
+
+interfacesdir = @sysconfigdir@/interfaces
+
+interfaces_DATA = 
+
+EXTRA_DIST = \
+       $(interfaces_DATA) \
+       $(sbin_SCRIPTS) \
index e57fb108d3c41ae30c7cbf56e59948171bb4eaaf..0809b723e57076f4361e17ce18afa185638d7ba5 100755 (executable)
@@ -2,7 +2,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 CONFIG=$1
 
@@ -11,8 +11,8 @@ CONFIG=$1
     exit 1
 }
 
-[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
-[ -f "$CONFIG" ] || {
+[ -f "/etc/sysconfig/interfaces/$CONFIG" ] || CONFIG=ifcfg-$CONFIG
+[ -f "/etc/sysconfig/interfaces/$CONFIG" ] || {
     echo "usage: ifdown <device name>" >&2
     exit 1
 }
index bdd9c12a0d13b9788e70bea8ed96413767a2a275..22770a0d74d1f472ac9d694e71b748c92211147e 100755 (executable)
@@ -2,7 +2,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 CONFIG=$1
 source_config
index 91628ee39503a92598084603b3dd61eaa35ce4ad..4010ca709aa8c6c130516bd4efe37b10963e6858 100755 (executable)
@@ -2,7 +2,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 CONFIG=$1
 source_config
index f09dc5703c41399db6a6098d5b38326cbf8e582e..dee5d328233c90387ba4f5e9cbb6811d3482354f 100755 (executable)
@@ -2,8 +2,8 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
-. ../network
-. ./network-functions
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions.network
 
 need_hostname
 
@@ -14,8 +14,8 @@ CONFIG=$1
     exit 1
 }
 
-[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
-[ -f "$CONFIG" ] || {
+[ -f "/etc/sysconfig/interfaces/$CONFIG" ] || CONFIG=ifcfg-$CONFIG
+[ -f "/etc/sysconfig/interfaces/$CONFIG" ] || {
     echo "usage: ifup <device name>" >&2
     exit 1
 }
@@ -133,7 +133,7 @@ if [ "$IPSETUP" != yes ]; then
 
     if [ "${IP6VNETWORKING}" = "yes" ] ; then 
       for ADDR in ${IP6VADDRS} ; do
-        ifconfig ${DEVICE} add ${ADDR}
+        ip addr add add ${ADDR} dev ${DEVICE}
       done  
     fi
     
index acbc3e98ce8a715fb23bb9c9f136fefe2e38c430..5162e370174e014b39139389c1bc2747d9c6c49e 100755 (executable)
@@ -7,10 +7,10 @@ if [ "$1" = "" ]; then
        exit 1
 fi
 
-aliases="`echo /etc/sysconfig/network-scripts/ifcfg-$1:*`"
-if [ "$aliases" = '/etc/sysconfig/network-scripts/ifcfg-$1:*' ]; then
+aliases="`echo /etc/sysconfig/interfaces/ifcfg-$1:*`"
+if [ "$aliases" = '/etc/sysconfig/interfaces/ifcfg-$1:*' ]; then
        allow_null_glob_expansion=foo
-       for alias in /etc/sysconfig/network-scripts/ifcfg-$1:* ; do
+       for alias in /etc/sysconfig/interfaces/ifcfg-$1:* ; do
            /etc/sysconfig/network-scripts/ifup $alias
        done
        unset allow_null_glob_expansion
index ddf4a63f73e2cea1c3d51c3c1add8a69f9b949d8..ab472708f9904c622ad4b52b63fe784d1bd3d9c1 100755 (executable)
@@ -2,7 +2,7 @@
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 CONFIG=$1
 source_config
index 1b39c5845b00f29bbcec5bff1e3b05ad03fbbf6a..48e6478c82341ac285382da27c9a6219467993fb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 need_hostname
 CONFIG=$1
index f773ada438c2d26d37bc08483082bf62c093f237..f889041ea9183a68e4426de50e093c741dc207dd 100755 (executable)
@@ -26,7 +26,7 @@ shift
 
 CONFIG=$1
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 source_config
 if [ -z "$HOLDOFF" ]; then
   HOLDOFF=30
index d89d70d3a8da1370e9bf247f4011a456698f51a5..2d461dbf879a425f3d120e0b6f37e26126fab7b2 100755 (executable)
@@ -13,7 +13,7 @@ fi
 shift
 
 cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
 
 CONFIG=$1
 source_config
index a0902a4a836099313d8d01fe68741b397b2c0d4d..dfa1c833abad07b3b87b786d31daaa999586c651 100644 (file)
@@ -1,13 +1,21 @@
-###########
-# $RUN_SULOGIN_ON_ERR -        if "yes" this cause run on any errors sulogin instead
-#                      shell
-
+# On errors (when system is starting) run sulogin instead of shell ?
 RUN_SULOGIN_ON_ERR=yes
 
-###########
-# $DO_AUTO_SETUP_MEDIA - if "yes" perform automated setting up permission on
-#                      /dev/hd? devices (664 on cdrom, 660 on disk) and
-#                      prepare /etc/fstab for allow mount/umout for all
-#                      normal users
+# Default run nice level for all services if
+# $SERVICE_RUN_NICE_LEVEL is not defined in /etc/sysconfig/<service>
+DEFAULT_SERVICE_RUN_NICE_LEVEL=0
+
+# Run isapnp at system startup ?
+RUN_ISAPNP=yes
+
+# After how many seconds reboot system after kernel panic ?
+# 0 - never reboot system (suggested 60)
+PANIC_REBOOT_TIME=0
+
+# Do not allow users to login when system is starting
+# (but allow when it end "starting" process) ?
+DELAY_LOGIN=yes
+
+# Clean /tmp at startup ?
+CLEAN_TMP=yes
 
-DO_AUTO_SETUP_MEDIA=yes
This page took 3.550509 seconds and 4 git commands to generate.