-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
+++ /dev/null
-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
--- /dev/null
+
+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
--- /dev/null
+
+#!/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
--- /dev/null
+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)
--- /dev/null
+Makefile.in Makefile
--- /dev/null
+@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)
--- /dev/null
+.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.
--- /dev/null
+.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
--- /dev/null
+.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.
/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
-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>
Sample Script
=============
-#!/bin/bash
+#!/bin/sh
#
# /etc/rc.d/init.d/<servicename>
#
# 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>
;;
$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
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]
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
configuration files.
Copyright (c) 1998 Red Hat Software, Inc.
+Modified Corrected & Overlocked by PLD (r) Team 1999.
--- /dev/null
+.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.
--- /dev/null
+.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>
--- /dev/null
+#!/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
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
--- /dev/null
+@SET_MAKE@
+
+SUBDIRS = ip-up.d ip-down.d
+
+pppdir = @pppdir@
+
+ppp_SCRIPTS = \
+ ip-up \
+ ip-down
+
+EXTRA_DIST = $(ppp_SCRIPTS)
--- /dev/null
+@SET_MAKE@
+
+ipdowndir= @pppdir@/ip-down.d
+
+ipdown_SCRIPTS = logger
+
+EXTRA_DIST = $(ipdown_SCRIPTS)
--- /dev/null
+@SET_MAKE@
+
+ipupdir= @pppdir@/ip-up.d
+
+ipup_SCRIPTS = logger
+
+EXTRA_DIST = $(ipup_SCRIPTS)
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
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
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
%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
%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
%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*
%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
%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,
- 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.
--- /dev/null
+@SET_MAKE@
+
+SUBDIRS = init.d
+
+rcdir = @rcdir@
+
+rc_SCRIPTS = \
+ rc \
+ rc.local \
+ rc.serial \
+ rc.sysinit
+
+EXTRA_DIST = $(rc_SCRIPTS)
--- /dev/null
+@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)
# 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
# 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]"
}
# A function to find the pid of a program.
-pidofproc() {
+pidofproc()
+{
# Test syntax.
if [ $# = 0 ] ; then
echo "Usage: pidofproc {program}"
return 1
}
-status() {
+status()
+{
# Test syntax.
if [ $# = 0 ] ; then
echo "Usage: status {program}"
--- /dev/null
+# 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()
+
# 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
# 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)
# 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
#
# 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
#
# 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
# 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
#
# Original Author:
# Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
+# Changes: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
#
# Source function library.
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.
# 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??}
# 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??}
$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
+
#!/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:
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}
# /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
. /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
fi
if [ ! -f /fastboot ]; then
- echo "Checking root filesystems."
+ show "Checking root filesystems."; started
fsck -V -a $fsckoptions /
rc=$?
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
# 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
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
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
# 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=$?
/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=$?
/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*
rm -f /tmp/.s.PGSQL.*
# Set the system clock.
-echo -n "Setting clock"
+show "Setting clock"; busy
ARC=0
UTC=0
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
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
# Feed entropy into the entropy pool
/etc/rc.d/init.d/random start
+
--- /dev/null
+@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
--- /dev/null
+@SET_MAKE@
+
+SUBDIRS = network-scripts
+
+sysconfigdir = @sysconfigdir@
+
+sysconfig_DATA = \
+ system \
+ network \
+ static-routes
+
+EXTRA_DIST = $(sysconfig_DATA)
--- /dev/null
+DEVICE=lo
+IPADDR=127.0.0.1
+NETMASK=255.0.0.0
+NETWORK=127.0.0.0
+BROADCAST=127.255.255.255
+ONBOOT=yes
--- /dev/null
+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
--- /dev/null
+# (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
--- /dev/null
+# (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
--- /dev/null
+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
+# 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"
+
--- /dev/null
+@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) \
PATH=/sbin:/usr/sbin:/bin:/usr/bin
cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
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
}
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
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
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
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
}
if [ "${IP6VNETWORKING}" = "yes" ] ; then
for ADDR in ${IP6VADDRS} ; do
- ifconfig ${DEVICE} add ${ADDR}
+ ip addr add add ${ADDR} dev ${DEVICE}
done
fi
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
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
#!/bin/sh
cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
need_hostname
CONFIG=$1
CONFIG=$1
cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
source_config
if [ -z "$HOLDOFF" ]; then
HOLDOFF=30
shift
cd /etc/sysconfig/network-scripts
-. ./network-functions
+. /etc/rc.d/init.d/functions.network
CONFIG=$1
source_config
-###########
-# $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