]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
merged totalnew 3d patch as new TOTALNEW branch
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 18 Oct 2000 20:10:55 +0000 (20:10 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 18 Oct 2000 20:10:55 +0000 (20:10 +0000)
svn-id: @803

72 files changed:
AUTHORS
COPYING
DEVELOPMENT [new file with mode: 0644]
Makefile.am
NEWS
README
TODO
adjtime [deleted file]
autogen.sh
configure.in
doc/net-scripts.txt
doc/sysconfig.txt
inittab
lang.csh
makepot.pl
modules [new file with mode: 0644]
po/Makefile.am
po/pl.po
rc-scripts.spec.in
rc.d/Makefile.am
rc.d/init.d/allowlogin
rc.d/init.d/functions
rc.d/init.d/functions.network [deleted file]
rc.d/init.d/killall
rc.d/init.d/network
rc.d/init.d/random
rc.d/init.d/single
rc.d/init.d/template.init
rc.d/init.d/timezone
rc.d/rc
rc.d/rc.init
rc.d/rc.local
rc.d/rc.modules [new file with mode: 0755]
rc.d/rc.shutdown
rc.d/rc.sysinit
run-parts
setsysfont
sysconfig/interfaces/Makefile.am
sysconfig/interfaces/ifcfg-atm0 [new file with mode: 0644]
sysconfig/interfaces/ifcfg-br0 [new file with mode: 0644]
sysconfig/interfaces/ifcfg-description
sysconfig/interfaces/ifcfg-lec0 [new file with mode: 0644]
sysconfig/interfaces/ifcfg-ppp0.leased1
sysconfig/interfaces/ifcfg-ppp0.leased2
sysconfig/interfaces/ifcfg-ppp0.tpsa
sysconfig/interfaces/ifcfg-sl0
sysconfig/interfaces/tnlcfg-description
sysconfig/interfaces/tnlcfg-icm
sysconfig/network
sysconfig/network-scripts/Makefile.am
sysconfig/network-scripts/ifdown
sysconfig/network-scripts/ifdown-br [new file with mode: 0755]
sysconfig/network-scripts/ifdown-lec [new file with mode: 0755]
sysconfig/network-scripts/ifdown-post
sysconfig/network-scripts/ifdown-ppp
sysconfig/network-scripts/ifdown-sl
sysconfig/network-scripts/ifup
sysconfig/network-scripts/ifup-aliases
sysconfig/network-scripts/ifup-atm [new file with mode: 0755]
sysconfig/network-scripts/ifup-br [new file with mode: 0755]
sysconfig/network-scripts/ifup-ipx
sysconfig/network-scripts/ifup-lec [new file with mode: 0755]
sysconfig/network-scripts/ifup-plip
sysconfig/network-scripts/ifup-post
sysconfig/network-scripts/ifup-ppp
sysconfig/network-scripts/ifup-routes
sysconfig/network-scripts/ifup-sl
sysconfig/network-scripts/tnldown
sysconfig/network-scripts/tnlup
sysconfig/system
sysconfig/timezone
sysctl.conf [new file with mode: 0644]

diff --git a/AUTHORS b/AUTHORS
index 98c74a24ba4c66f88a70021601f654e522a0ba52..1204b66082a709b819e88b97caacf23914dd78dd 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,28 +1,49 @@
 
-       $Id: AUTHORS,v 1.5 1999/12/11 12:45:13 misiek Exp $
+       $Id: AUTHORS,v 1.5.2.1 2000/10/18 20:10:44 misiek Exp $
 
-In alphabetical order:
+MAINTAINERS
 
-Artur Frysiak          <wiget@pld.org.pl>
-       - automake/autoconf support
-       - rc-scripts.spec maintaning
+Maintainer of development version (so called ,,totalnew'')
+is Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 
-Tomasz K³oczko         <kloczek@wun.zie.pg.gda.pl>
-       - automake/autoconf updates
-       - rc-scripts.spec updates
+AUTHORS/CREDITS
 
-Jacek Konieczny                <jajcus@zeus.polsl.gliwice.pl>
-       - LDAP support
+Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+       networking functions, iproute2 support,
+       national language support, scripts for
+       controling tunnels and bridges
 
-Arkadiusz Mi¶kiewicz   <misiek@pld.org.pl>
-       - networking functions
-       - iproute2 support
-       - national language support
-       - scripts for controling tunnels
+Artur Frysiak <wiget@pld.org.pl>
+       automake/autoconf support, bug fixes
 
-Grzegorz Stanislawski  <stangrze@open.net.pl>
-       - great ppp scripts
-       - prefix/netmask converting functions
-       - bug fixes
+Bartosz Waszak <waszi@pld.org.pl>
+       fixes, devfsd support
+
+Grzegorz Stanislawski <stangrze@open.net.pl>
+       ppp scripts, prefix/netmask converting
+       functions, bug fixes
+
+Jacek Konieczny <jajcus@zeus.polsl.gliwice.pl>
+       LDAP support
+       
+Jan Rêkorajski <baggins@pld.org.pl>
+       general, ipv6 and dhcp fixes
+       
+Micha³ Kochanowicz <mkochano@pld.org.pl>
+       fixes, progress()
+       
+Pawe³ Wilk <siefca@pl.qmail.org>
+       executing scripts on iface up/down
+
+Robert ¦laski <robin@atm.com.pl>
+       ATM support
+
+Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
+       many fixes
+
+Tomasz K³oczko <kloczek@wun.zie.pg.gda.pl>
+       automake/autoconf updates, bug fixes
+
+Mandrake Software
+RedHat Software, Inc.
 
-Other guys ....
diff --git a/COPYING b/COPYING
index a43ea2126fb6b114bff5f8e003ee118e045dacf1..60549be514af76c5db0c17ce6bbe01b2f81e2d9e 100644 (file)
--- a/COPYING
+++ b/COPYING
@@ -2,7 +2,7 @@
                       Version 2, June 1991
 
  Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                          675 Mass Ave, Cambridge, MA 02139, USA
+                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  Everyone is permitted to copy and distribute verbatim copies
  of this license document, but changing it is not allowed.
 
@@ -279,7 +279,7 @@ POSSIBILITY OF SUCH DAMAGES.
 
                     END OF TERMS AND CONDITIONS
 \f
-       Appendix: How to Apply These Terms to Your New Programs
+           How to Apply These Terms to Your New Programs
 
   If you develop a new program, and you want it to be of the greatest
 possible use to the public, the best way to achieve this is to make it
@@ -305,7 +305,8 @@ the "copyright" line and a pointer to where the full notice is found.
 
     You should have received a copy of the GNU General Public License
     along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
 
 Also add information on how to contact you by electronic and paper mail.
 
diff --git a/DEVELOPMENT b/DEVELOPMENT
new file mode 100644 (file)
index 0000000..3954f98
--- /dev/null
@@ -0,0 +1,40 @@
+          READ THIS BEFORE CHANGEING SOMETHING IN RC-SCRIPTS PACKAGE
+                   Arkadiusz Miskiewicz <misiek@pld.org.pl>
+           $Id: DEVELOPMENT,v 1.1.2.1 2000/10/18 20:10:45 misiek Exp $
+
+1)
+       consult all major changes with people on pld-rc-scripts@pld.org.pl
+mailing list. This is very important.
+
+2)
+       use 'local' for local variables in functions for example:
+
+function_ble ()
+{
+local qw er
+qw=$(tty)
+er=/dev/console
+echo "$qw $er"
+}
+
+3)
+       use $() instead `` for command execution for example
+
+something=$(whoami)
+instead of
+something="`whoami`"
+
+4)
+       consider using typeset -i variable for integer variables
+
+5)     don't use sed ! It only causes one more Requires.
+       Use awk ' { gsub(/pattern/,"replaced"); print $0; } ' for that.
+       Also try replase grep calls with awk calls.
+       
+5)
+       (PL) Tlumaczac komunikaty na PL nalezy uzywac formy bezosobowej np:
+
+uruchamianie uslugi
+zamiast
+uruchamiam usluge
+
index 64d3c557d3d38f2faad022f32152c3012c70005f..89850a0aa604e7056bb1715e3fff7c074b1bb2c5 100644 (file)
@@ -1,12 +1,14 @@
 #
-#      $Id: Makefile.am,v 1.6 2000/05/07 18:59:59 siefca Exp $
+#      $Id: Makefile.am,v 1.6.2.1 2000/10/18 20:10:45 misiek Exp $
 #
 
 SUBDIRS = src ppp sysconfig rc.d doc po
 
 sysconf_DATA = \
        adjtime \
-       inittab 
+       inittab \
+       modules \
+       sysctl.conf
 
 profiledir = @sysconfdir@/profile.d
 
diff --git a/NEWS b/NEWS
index 8b6d046b2b3509dacd0cb4ba07acafa5c0144189..50f78574f7c07116c7068be8b1c003124caae189 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,11 +1,20 @@
 
-       $Id: NEWS,v 1.6 2000/03/27 16:07:48 misiek Exp $
+       $Id: NEWS,v 1.6.2.1 2000/10/18 20:10:45 misiek Exp $
+
+Features of rc-scripts:
 
 - National Language Support; currently only english and polish
   supported. Translators needed.
-  
-- PREFIX support (instead of NETMASK) - CIDR specification.
-
-- LDAP support (for interfaces database).
-
+- LDAP support (for interfaces database). NYF.
 - Full IPv6 support (including PPP).
+- fourtun (v4 over v6) tunneling support.
+- support for few dhcp clients (dhcpcd, dhclient, dhcpxd, pump)
+- Logical Volume Manager (LVM) support.
+- /etc/sysctl.conf support.
+- queueing discipline support.
+- IPv6 boot method (v4compat).
+- bridge configuration support.
+- ATM support (not tested because I don't have ATM hardware)
+
+Note:
+NYF - not yet finished.
diff --git a/README b/README
index 9fed94cdc674010725c85e17d4de287fa50c2640..b54ac42b913f5689b2e4bdd76eaa9d4657d6caa6 100644 (file)
--- a/README
+++ b/README
@@ -1,16 +1,40 @@
+       $Id: README,v 1.6.2.1 2000/10/18 20:10:45 misiek Exp $
+
+rc-scripts is a derivative of the initscripts 3.78 release by
+RedHat Software, but with bugs removed and newer features added.
+
+You need packages such as: mktemp, modutils (at least 2.1.121),
+textutils, sh-utils, mawk (at least 1.3.3; other awk
+implementations are not tested), procps, sed, e2fsprogs,
+gettext to use rc-scripts.
+
+If you want to use networking with rc-scripts you need
+compile few features such as:
+
+Networking options  --->
+        [*] Kernel/User netlink socket
+        [*]   Routing messages
+
+into your kernel and install Alexey Kuznetsov iproute2 package.
+To use IPv6 networking you should compile:
+
+Networking options  --->
+       <*/M>   The IPv6 protocol (EXPERIMENTAL)
+        [*]      IPv6: enable EUI-64 token format     
+        [*]        IPv6: disable provider based addresses 
+
+too. IPX support require ncpfs package; fourtun (v4 over v6
+tunneling) support require fourtun package and fourtun kernel
+module; bridge support require bridge-utils.
+
+Also you should know that format of interface configuration
+files is totally different from these used in RedHat/Mandrake
+initscripts.
+
+If you have some bug reports or suggestions please send email
+to rc-scripts maintainers at <pld-rc-scripts@pld.org.pl> or
+use our Bug Tracking System ( http://bugs.pld.org.pl/ ).
+
+-- 
+PLD GNU/Linux rc-scripts Team,
 
-       $Id: README,v 1.6 2000/03/15 15:07:46 misiek Exp $
-
-CRITICAL THINGS
-If you want use this rc-scripts remember to compile:
-- Kernel/User netlink socket
-- Routing messages
-support into your kernel. This is very important ! Without
-this network scripts will fail.
-
-STANDARD THINGS
-If you want use IPv6 networking remember to compile:
-- The IPv6 protocol (EXPERIMENTAL) 
-- IPv6: enable EUI-64 token format
-- IPv6: disable provider based addresses
-into your kernel (last two options are optional) !
diff --git a/TODO b/TODO
index 557aed8ed019c572db3c88ec7b13249d71adf919..5510b5dc0d215a407409441fd6b60244f77f1a08 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,5 +1,7 @@
-$Id: TODO,v 1.12 1999/09/02 12:38:52 misiek Exp $
+$Id: TODO,v 1.12.2.1 2000/10/18 20:10:45 misiek Exp $
 
-TODO List:
-- obs³uga tuneli IPX
+Features missing:
+- IPSec (freeswan) support
+- NLS with national characters support (soon)
 
+We are waiting for suggestions.
diff --git a/adjtime b/adjtime
deleted file mode 100644 (file)
index 7481b11..0000000
--- a/adjtime
+++ /dev/null
@@ -1 +0,0 @@
-0.0 0 0.0
index 7f43b7e64f232e7f6658bbdf2112b7bd4e61ec09..390eb78b09b96d2c229be038b47bf28ed777f41b 100755 (executable)
@@ -1,11 +1,11 @@
 #!/bin/sh
-# $Id: autogen.sh,v 1.5 2000/01/31 14:30:11 misiek Exp $
+# $Id: autogen.sh,v 1.5.2.1 2000/10/18 20:10:45 misiek Exp $
 # Run this to generate all the initial makefiles, etc.
 
 srcdir=`dirname $0`
 test -z "$srcdir" && srcdir=.
 
-PKG_NAME="PLD/Linux rc-scripts"
+PKG_NAME="PLD GNU/Linux rc-scripts"
 
 (test -f $srcdir/configure.in \
   && test -d $srcdir/src) || {
index 584dfb6950c0115fcdeec8cb615f8cc5cd9bf480..8ff55cbd640db3643b5317aafa79aa56cc22afb4 100644 (file)
@@ -1,8 +1,8 @@
-dnl $Id: configure.in,v 1.31 2000/07/31 07:28:22 kloczek Exp $
+dnl $Id: configure.in,v 1.31.2.1 2000/10/18 20:10:45 misiek Exp $
 AC_INIT()
 
 PACKAGE=rc-scripts
-VERSION=0.2.5
+VERSION=0.4.0
 ALL_LINGUAS="pl"
 
 SHSCRIPTS="rc.d/rc                     \
@@ -18,7 +18,24 @@ SHSCRIPTS="rc.d/rc                   \
        rc.d/rc.init                    \
        rc.d/rc.local                   \
        rc.d/rc.shutdown                \
-       rc.d/rc.sysinit"
+       rc.d/rc.sysinit                 \
+       sysconfig/network-scripts/ifdown        \
+       sysconfig/network-scripts/ifdown-br     \
+       sysconfig/network-scripts/ifdown-post   \
+       sysconfig/network-scripts/ifdown-ppp    \
+       sysconfig/network-scripts/ifdown-sl     \
+       sysconfig/network-scripts/ifup          \
+       sysconfig/network-scripts/ifup-aliases  \
+       sysconfig/network-scripts/ifup-br       \
+       sysconfig/network-scripts/ifup-ipx      \
+       sysconfig/network-scripts/ifup-plip     \
+       sysconfig/network-scripts/ifup-post     \
+       sysconfig/network-scripts/ifup-ppp      \
+       sysconfig/network-scripts/ifup-routes   \
+       sysconfig/network-scripts/ifup-sl       \
+       sysconfig/network-scripts/tnldown       \
+       sysconfig/network-scripts/tnlup         \
+       "
 
 AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
 
index 69ee2fc886b95582c78709c0a04b99ff64fb83d6..1fdbcc1981570b4a8659ed1acb9807c63d75e392 100644 (file)
@@ -1,4 +1,4 @@
-$Id: net-scripts.txt,v 1.4 1999/10/07 00:49:51 kloczek Exp $
+$Id: net-scripts.txt,v 1.4.2.1 2000/10/18 20:10:46 misiek Exp $
 
 rc-scripts files:
 ========================================
@@ -25,7 +25,7 @@ rc-scripts files:
 
 /etc/sysconfig/network-scripts/ifup-post
 
-  Called when any network device EXCEPT a SLIP device comes
+  Called when any network device EXCEPT a SLIP (with dip) device comes
   up.  Calls /etc/sysconfig/network-scripts/ifup-routes to
   bring up static routes that depend on that device.  Calls
   /sbin/network-scripts/ifup-aliases to bring up
@@ -73,22 +73,20 @@ Files in /etc/sysconfig/interfaces/
   Base items:
     DEVICE=<name of physical device (except dynamically-allocated PPP
       devices where it is the "logical name")
-    IPADDR=
-    IPV6ADDRS=<blank separated list of ipv6 addresses>
-    PREFIX= 
+    IP_1_ADDR=         IP_1_AOPTS=     IP_1_ROPTS=
+    IP_2_ADDR=         IP_2_AOPTS=     IP_2_ROPTS=
+    IP_X_ADDR=         IP_X_AOPTS=     IP_X_ROPTS=
+    IP4_PRIM_NR=       IP4_SRC_NR=
+    IP6_PRIM_NR=       IP6_SRC_NR=
     GATEWAY=
     ONBOOT=yes|no
     USERCTL=yes|no
-    BOOTPROTO=none|bootp|dhcp
+    BOOTMETHOD=none|bootp|dhcp|pump
 
-  If BOOTPROTO is not "none", then the only other item that
+  If BOOTMETHOD is not "none", then the only other item that
   must be set is the DEVICE item; all the rest will be determined
   by the boot protocol.  No "dummy" entries need to be created.
 
-  Base items being deprecated:
-    NETWORK=<will be calculated automatically with ifcalc>
-    BROADCAST=<will be calculated automatically with ifcalc>
-
   Ethernet-only items:
     {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP}
     configuration matrix for IPX.  Only used if IPX is active.
@@ -124,7 +122,8 @@ Files in /etc/sysconfig/interfaces/
       In principal, I'm not aware of anything that would keep
       the logical PPP device names from being "worldnet" or
       "myISP" instead of ppp0-pppN)
-    REMIP=<remote ip address, normally unspecified>
+    REMIP=<remote ip4 address, normally unspecified>
+    REMIP6=<remote ip6 address, normally unspecified>
     MTU=
     MRU=
     DISCONNECTTIMEOUT=<number of seconds, default currently 5>
@@ -142,6 +141,14 @@ Files in /etc/sysconfig/interfaces/
       List of variables which should be exported to chat script.
       Used mostly for passing USERNAME and PASSWORD into it. (see below)
       (PLD rc-scripts specific option)
+    PEERDNS=yes|no
+    IPV6_PPP=yes|no
+      use IPv6 for ppp
+       IPV6_CP_USEV4=yes|no
+         use local IPv4 mapped addresses as IPv6 addresses
+       IPV6_CP_PERSISTENT=yes|no
+         use EUI-48 addresses as IPv6 addresses
+       or by default use address specified by IP6_PRIM_NR and REMIP6
     <anything>=<anything>
       Variable name and it's value for use by chat script.
       Note: You don't have to define variables here, if they are defined 
index 18455a7a8c57c65665be6bedc85b764671608081..d60bf15fe8e18d490c879baf554672e2fa7501f0 100644 (file)
@@ -1,4 +1,4 @@
-$Id: sysconfig.txt,v 1.3 1999/07/13 12:49:35 misiek Exp $
+$Id: sysconfig.txt,v 1.3.2.1 2000/10/18 20:10:46 misiek Exp $
 
 Files in /etc/sysconfig
 =======================
@@ -37,7 +37,8 @@ Files in /etc/sysconfig
 /etc/sysconfig/network:
 
   NETWORKING=yes|no
-  IPV6NETWORKING=yes|no
+  IPV4_NETWORKING=yes|no
+  IPV6_NETWORKING=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
diff --git a/inittab b/inittab
index 1f341ea5c1beba05ca9acd2a201076c37b4edd41..557a8d5bd75ccb726088dee0819b00f7d82e7202 100644 (file)
--- a/inittab
+++ b/inittab
@@ -2,7 +2,7 @@
 # inittab       This file describes how the INIT process should set up
 #               the system in a certain run-level.
 #
-#              $Id: inittab,v 1.4 1999/07/31 11:24:17 misiek Exp $
+#              $Id: inittab,v 1.4.2.1 2000/10/18 20:10:45 misiek Exp $
 #
 # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 #               Modified for RHS Linux by Marc Ewing and Donnie Barnes
@@ -56,5 +56,9 @@ pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled"
 7:2345:respawn:/sbin/mingetty tty7
 8:2345:respawn:/sbin/mingetty tty8
 
+# Examples
+# 9:2345:respawn:/sbin/mingetty --mono tty9
+# 10:2345:respawn:/sbin/mingetty --remote-host=some.host.in.net.pl tty10
+
 # Run xdm in runlevel 5
 #x:5:respawn:/usr/bin/X11/xdm -nodaemon
index 8dd92a54af5c1d8a085b03b7e9ae544687c3d4b2..aecc0ecb8a30571e116206e78aee21485729a90a 100755 (executable)
--- a/lang.csh
+++ b/lang.csh
@@ -1,6 +1,6 @@
 #!/bin/csh
 #
-#      $Id: lang.csh,v 1.3 1999/12/15 18:41:05 misiek Exp $
+#      $Id: lang.csh,v 1.3.2.1 2000/10/18 20:10:45 misiek Exp $
 #
 
 test -f /etc/sysconfig/i18n
@@ -22,29 +22,18 @@ if ($status == 0) then
        setenv TERM=$SYSTERM
     endif
 
-#    # Set console font map.
-#    if ($?UNIMAP) then
-#      loadunimap $UNIMAP
-#    endif
+    if ($?_XKB_CHARSET) then
+       setenv _XKB_CHARSET
+    endif
 
-    if ($?SYSFONTACM) then
-        switch ($SYSFONTACM)
-            case iso01*|iso02*|iso15*|koi*|latin2-ucw*:
-                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
-                    endif
-                endif
-                breaksw
-        endsw
+    if ($?INPUTRC) then
+       setenv INPUTRC
     endif
 
-    if ($?SYSTERM) then
-       switch ($SYSTERM)
-       case linux-lat:
-               setenv LESSCHARSET=latin1
-               setenv INPUTRC=/etc/inputrc
-               breaksw
-       endsw
+    if ($?LESSCHARSET) then
+       setenv LESSCHARSET
+    else if ($TERM == linux-lat) then
+       setenv LESSCHARSET latin1
     endif
+
 endif
index fb3d30573ba83e72b6b45875ca485b9e1983005e..5718f87adfa734d357ca9efb615f4265b55b752c 100755 (executable)
@@ -5,7 +5,10 @@
 #
 # Copyright (c) 1999 Free Software Fundation, Inc.
 # Artur Frysiak <wiget@pld.org.pl>
-# $Id: makepot.pl,v 1.4 2000/06/25 14:40:35 waszi Exp $
+# $Id: makepot.pl,v 1.4.2.1 2000/10/18 20:10:45 misiek Exp $
+# Changes:
+# 2000-08-25 Arkadiusz Miskiewicz <misiek@pld.org.pl>
+# - support for $(nls "xyz"), progress "xyz" and '' instead of "".
 # 
 
 my %pot;
@@ -56,7 +59,7 @@ for (my $a = 0; $a <= $#ARGV; $a++) {
        open (POTSRC, "< " . $filename) || die "Can't open " . $filename;
        foreach (<POTSRC>) {
                chop;
-               if (/(run_cmd|nls|show)\s[\sa-zA-Z0-9-]*"(?!\`nls\s\")([^"]*)"/g) {
+               if ((/(run_cmd|nls|show|progress)\s[\sa-zA-Z0-9-]*"(?!(\`|\$\()nls\s\")([^"]*)"/g) or (/(run_cmd|nls|show|progress)\s[\sa-zA-Z0-9-]*'(?!(\`|\$\()nls\s\")([^"]*)'/g)) {
 #                      potentry($1,$lnr,$filename) if defined $1;
                        potentry($2,$lnr,$filename) if defined $2;
                        potentry($3,$lnr,$filename) if defined $3;
diff --git a/modules b/modules
new file mode 100644 (file)
index 0000000..b61e0c6
--- /dev/null
+++ b/modules
@@ -0,0 +1,8 @@
+# /etc/modules: kernel modules to load at boot time.
+# $Id: modules,v 1.1.2.1 2000/10/18 20:10:45 misiek Exp $
+#
+# This file should contain the names of kernel modules that are
+# to be loaded at boot time, one per line.  Comments begin with
+# a `#', and everything on the line after them are ignored.
+
+# loop
index 3e8f6601b731ffb982226e70514970266aa45bda..f1fd4a068c50a6c96bb2d1109d53b63f64f610e4 100644 (file)
@@ -16,7 +16,7 @@ SUFFIXES = .po .mo .gmo
        $(MSGFMT) -o $@ $<
 
 .po.gmo: $(PACKAGE).pot
-       file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
+       file=$(srcdir)/`echo $* | awk ' { gsub(/.*\//,NIL); print $0; } '`.gmo \
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
 $(PACKAGE).pot: Makefile $(POTSRC)
@@ -32,7 +32,7 @@ update-po: Makefile
        catalogs='$(CATALOGS)'; \
        for cat in $$catalogs; do \
          cat=`basename $$cat`; \
-         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+         lang=`echo $$cat | awk ' { gsub(/\$(CATOBJEXT)$$/,NIL); print $0; } '`; \
          mv $$lang.po $$lang.old.po; \
          echo "$$lang:"; \
          if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
@@ -59,7 +59,7 @@ install-data-hook: all
            *.gmo) destdir=$(gnulocaledir);; \
            *)     destdir=$(localedir);; \
          esac; \
-         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+         lang=`echo $$cat | awk ' { gsub(/\$(CATOBJEXT)$$/,NIL); print $0; } '`; \
          dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
          if test -r "$(MKINSTALLDIRS)"; then \
            $(MKINSTALLDIRS) $$dir; \
@@ -96,7 +96,7 @@ uninstall-hook:
        catalogs='$(CATALOGS)'; \
        for cat in $$catalogs; do \
          cat=`basename $$cat`; \
-         lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
+         lang=`echo $$cat | awk ' { gsub(/\$(CATOBJEXT)$$/,NIL); print $0; } '`; \
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
index e5a2c74f43d0d896c9a9371ffa4042ed7c7566da..f2df15b1e63e66e0fecca36e557087ca1959fc47 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
 # Polish translation of rc-scripts.
 # Copyright (C) 1999, 2000 Free Software Foundation, Inc.
 # Arkadiusz Miskiewicz <misiek@pld.org.pl>, 1999, 2000.
-# $Id: pl.po,v 1.30 2000/06/29 08:24:14 waszi Exp $
+# $Id: pl.po,v 1.30.2.1 2000/10/18 20:10:47 misiek Exp $
 #
 # ,fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: rc-scripts 0.0.9\n"
+"Project-Id-Version: rc-scripts 0.2.5\n"
 "POT-Creation-Date: 1999-07-30 18:45+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: Polish <pl@li.org>\n"
 "MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=iso8850-2\n"
+"Content-Type: text/plain; charset=iso8859-2\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-#: ../rc.d/init.d/network:191
-msgid "Configured devices:"
-msgstr "Skonfigurowane urzadzenia sieciowe:"
-
-#: ../rc.d/rc.sysinit:136
-msgid "Today's date: `LC_CTYPE=C date`"
-msgstr ""
+#: ../rc.d/init.d/network:176
+msgid "Shutting down unconfigured interface %s"
+msgstr "Deaktywowanie nieskonfigurowanego interfejsu %s"
 
-#: ../rc.d/rc.sysinit:169
+#: ../rc.d/rc.sysinit:185
 msgid "Checking root filesystems."
 msgstr "Sprawdzanie glownego systemu plikow."
 
-#: ../rc.d/rc.sysinit:67
-#, fuzzy
-msgid "Mounting Device Filesystem"
-msgstr "Podlaczenie lokalnych systemow plikow."
+#: ../sysconfig/network-scripts/ifup-ppp:34
+msgid "ifup-ppp for %s exiting"
+msgstr "ifup-ppp dla %s zakanczany"
 
-#: ../rc.d/rc.sysinit:451
-msgid "Enabling swap space"
-msgstr "Wlaczenie swapa"
+#: ../rc.d/rc.sysinit:243
+msgid "Enabling Delay Login"
+msgstr "Wlaczanie opozniania logowania"
 
-#: ../rc.d/init.d/functions:123
-msgid "Usage: %s"
-msgstr "Uzycie: %s"
+#: ../sysconfig/network-scripts/ifup:24
+msgid "Users cannot control this device."
+msgstr "Uzytkownicy nie moga kontrolowac tego urzadzenia."
 
-#: ../rc.d/rc.sysinit:227
-msgid "Enabling Delay Login"
-msgstr "Wlaczenie opozniania logowania"
+#: ../rc.d/init.d/network:157
+msgid "Unmounting NCP filesystems"
+msgstr "Odlaczanie systemow plikow NCP"
 
-#: ../rc.d/init.d/functions.network:289
-msgid "Setting up IP spoofing protection"
-msgstr "Ustawienie zabezpieczenia przed IP spoofingiem"
+#: ../rc.d/init.d/network:154
+msgid "Unmounting SMB filesystems"
+msgstr "Odlaczanie systemow plikow SMB"
 
-#: ../rc.d/rc.sysinit:192 ../rc.d/rc.sysinit:377
-msgid "Automatic reboot in progress."
-msgstr "Automatyczny restart w toku."
+#: ../rc.d/rc.sysinit:413
+msgid "Activating LVM volume groups"
+msgstr "Aktywowanie grup woluminow LVM"
 
-#: ../rc.d/init.d/functions:352
-msgid "%s dead but pid file exists"
-msgstr "%s zabity ale plik z numerem procesu istnieje"
+#: ../rc.d/init.d/network:134
+msgid "Setting tunnel"
+msgstr "Ustawianie tunelu"
 
-#: ../rc.d/rc.sysinit:73
+#: ../rc.d/rc.sysinit:77
 msgid "Starting Device Filesystem Daemon"
-msgstr "Startuje Zarzadce Systemu Plikow Urzadzen (devfsd)"
+msgstr "Startowanie Zarzadcy Systemu Plikow Urzadzen (devfsd)"
 
-#: ../rc.d/init.d/functions:103
+#: ../rc.d/init.d/functions:120
 msgid "%s service is already running."
 msgstr "Usluga %s juz jest uruchomiona."
 
-#: ../rc.d/init.d/timezone:41
+#: ../rc.d/init.d/timezone:40
 msgid "Setting time zone information (%s)"
 msgstr "Ustawianie informacji o strefi czasowej (%s)"
 
-#: ../rc.d/init.d/functions:193
-msgid "$STRING"
-msgstr "$STRING"
-
 #: ../rc.d/init.d/timezone:38
 msgid "Setting time zone information (%s, %s)"
-msgstr "Ustawianie informacji o strefi czasowej (%s, %s)"
+msgstr "Ustawianie informacji o strefie czasowej (%s, %s)"
 
-#: ../rc.d/rc.sysinit:348
-msgid "Automatic reboot in progress"
-msgstr "Automatyczny restart w toku"
+#: ../rc.d/init.d/network:22 ../rc.d/init.d/network:32
+#: ../sysconfig/network-scripts/ifdown-br:36
+#: ../sysconfig/network-scripts/ifup-br:36
+#: ../sysconfig/network-scripts/ifup-ipx:22
+#: ../sysconfig/network-scripts/ifup-sl:87
+msgid "%s is missing. Can't continue."
+msgstr "Brakuje %s. Nie mozna kontynuowac."
+
+#: ../rc.d/init.d/functions.network:203
+msgid "Enabling IPv4 packed forwarding"
+msgstr "Aktywowanie przekazywanie pakietow IPv4"
 
-#: ../rc.d/rc.sysinit:180 ../rc.d/rc.sysinit:336 ../rc.d/rc.sysinit:365
+#: ../rc.d/rc.sysinit:196 ../rc.d/rc.sysinit:386 ../rc.d/rc.sysinit:429
 msgid "*** when you leave the shell."
 msgstr "*** po opuszczeniu powloki."
 
-#: ../rc.d/init.d/single:34 ../rc.d/rc.shutdown:26
-msgid "Sending all processes the KILL signal"
-msgstr "Wysylanie do wszystkich procesow sygnalu KILL"
+#: ../sysconfig/network-scripts/ifup-br:88
+msgid "problems with setting bridge %s"
+msgstr "problemy podczas konfiguracji bridge %s"
 
 #: ../rc.d/init.d/random:55
 msgid "The random data source is missing"
-msgstr "Oczekiwane zrodlo danych losowych"
-
-#: ../rc.d/init.d/functions:138
-msgid "BUSY"
-msgstr " ZAJETY "
+msgstr "Oczekiwane zrodlo danych losowych nie istnieje"
 
 #: ../rc.d/init.d/single:60
 msgid "Telling INIT to go to single user mode"
 msgstr "Przekazywanie procesowi INIT by przeszedl do trybu single"
 
-#: ../rc.d/rc:74
+#: ../rc.d/rc:93
 msgid "Entering non-interactive startup"
-msgstr "Wchodze w tryb nieinteraktywny"
+msgstr "Wchodzenie w tryb nieinteraktywny"
 
-#: ../rc.d/init.d/functions:335 ../rc.d/init.d/functions:343
+#: ../rc.d/init.d/functions:385
 msgid "%s (pid %s) is running..."
 msgstr "%s (pid %s) jest uruchomiony..."
 
 # Translation of words: "DONE", "WORK", "BUSY", "FAIL", "DIED"
 # must have that same count of letters !!!!!!!!!!!!!!!!!!!!!!!
-#: ../rc.d/init.d/functions:129 ../rc.d/init.d/functions:144 ../rc.d/rc:94
+#: ../rc.d/init.d/functions:170 ../rc.d/rc:113
 msgid "DONE"
 msgstr "ZROBIONE"
 
-#: ../rc.d/init.d/network:193
-msgid "Configured tunnels:"
-msgstr "Skonfigurowane tunele:"
+#: ../rc.d/init.d/functions.network:205
+msgid "Disabling IPv4 packed forwarding"
+msgstr "Deaktywowanie przekazywanie pakietow IPv4"
 
-#: ../rc.d/rc.sysinit:289
-msgid "Loading sound module"
-msgstr "Ladowanie modul obslugi dzwieku"
+#: ../sysconfig/network-scripts/ifup:62
+msgid "Delaying %s initialization"
+msgstr "Opoznianie inicjalizacji interfejsu %s"
 
-#: ../rc.d/rc.shutdown:59 ../rc.d/rc.sysinit:347 ../rc.d/rc.sysinit:376
+#: ../rc.d/rc.shutdown:64 ../rc.d/rc.sysinit:397 ../rc.d/rc.sysinit:440
 msgid "Remounting root filesystem in ro mode"
-msgstr "Przelaczenie glownego systemu plikow w tryb tylko do odczytu"
+msgstr "Przelaczanie glownego systemu plikow w tryb ro"
 
-#: ../rc.d/init.d/functions.network:235
-msgid "Enabling dynamic IP patch"
-msgstr ""
+#: ../rc.d/rc.sysinit:93
+msgid "Configuring kernel parameters"
+msgstr "Konfigurowanie parametrow jadra"
 
-#: ../rc.d/rc:161
+#: ../rc.d/rc:180
 msgid "The system is halted"
 msgstr "Dzialanie systemu zatrzymane"
 
-#: ../rc.d/init.d/functions:98
+#: ../rc.d/init.d/functions:115
 msgid "Starting %s service"
-msgstr "Uruchomienie uslugi %s"
+msgstr "Uruchamianie uslugi %s"
 
-#: ../rc.d/rc.sysinit:216
+#: ../sysconfig/network-scripts/ifup-sl:90
+msgid "/sbin/slattach does not exist or is not executable for %s"
+msgstr "/sbin/slattach nie istnieje lub nie jest wykonywalny dla %s"
+
+#: ../rc.d/rc.sysinit:232
 msgid "Remounting root filesystem in rw mode"
-msgstr "Przelaczenie glownego systemu plikow w tryb zapis/odczyt"
+msgstr "Przelaczanie glownego systemu plikow w tryb zapis/odczyt"
 
-#: ../rc.d/rc.sysinit:339
+#: ../rc.d/rc.sysinit:389
 msgid "(RAID Repair)# "
 msgstr "(Naprawa RAID)# "
 
-#: ../rc.d/rc:165
+#: ../rc.d/rc.sysinit:349
+msgid "Starting up RAID device %s"
+msgstr "Ustawianie urzadzen RAID %s"
+
+#: ../rc.d/init.d/random:22
+msgid "Initializing random number generator"
+msgstr "Inicjalizacja generatora liczb losowych"
+
+#: ../rc.d/rc.sysinit:450
+msgid "Mounting local filesystems."
+msgstr "Podlaczanie lokalnych systemow plikow."
+
+#: ../sysconfig/network-scripts/ifup-sl:56
+msgid "does not exist"
+msgstr "nie istnieje"
+
+#: ../rc.d/init.d/allowlogin:22
+msgid "Allowing users to login"
+msgstr "Pozwalanie uzytkownikom na logowanie sie"
+
+#: ../rc.d/init.d/functions:409
+msgid "Start service %s (Y)es/(N)o/(C)ontinue? [Y] "
+msgstr "Uruchomic usluge %s (Y)es/(N)o/(C)ontinue? [Y] "
+
+#: ../rc.d/rc.sysinit:311
+msgid "Finding module dependencies"
+msgstr "Wyszukiwanie powiazan pomiedzy modulami"
+
+#: ../rc.d/rc.shutdown:46 ../rc.d/rc.sysinit:206 ../rc.d/rc.sysinit:396
+#: ../rc.d/rc.sysinit:439
+msgid "Unmounting file systems"
+msgstr "Odlaczanie systemow plikow"
+
+#: ../rc.d/init.d/single:32 ../rc.d/rc.shutdown:24
+msgid "Sending all processes the TERM signal"
+msgstr "Wysylanie do wszystkich procesow sygnalu TERM"
+
+#: ../rc.d/init.d/functions:402
+msgid "%s is stopped"
+msgstr "%s jest zatrzymany"
+
+#: ../sysconfig/network-scripts/ifup:126
+msgid "Determining IP information for"
+msgstr "Uzyskiwanie informacji o IP dla"
+
+#: ../rc.d/rc.sysinit:199 ../rc.d/rc.sysinit:432
+msgid "(Repair filesystem)# "
+msgstr "(Naprawa systemu plikow)# "
+
+#: ../rc.d/init.d/functions:110
+msgid "ERROR: Networking is down. %s can't be run."
+msgstr "BLAD: Siec nie jest uruchomiona. %s nie moze zostac uruchomiony."
+
+#: ../rc.d/rc.sysinit:195 ../rc.d/rc.sysinit:385 ../rc.d/rc.sysinit:428
+msgid "*** Dropping you to a shell; the system will reboot"
+msgstr "*** Uruchamianie powloke; system zostanie zrestartowany"
+
+#: ../rc.d/rc.shutdown:82
+msgid "Remounting remaining filesystems ro mode"
+msgstr "Przelaczanie pozostalych systemow plikow w tryb tylko do odczytu"
+
+#: ../rc.d/rc.sysinit:331
+msgid "Loading synthesiser module"
+msgstr "Ladowanie modulu syntetyzera"
+
+#: ../rc.d/init.d/functions:130
+msgid "%s service is not running."
+msgstr "Usluga %s nie jest uruchomiona."
+
+#: ../rc.d/rc.sysinit:62
+msgid "\t\t     Press %sI%s to enter interactive startup."
+msgstr "\t\tProsze wcisnac %sI%s by wejsc w tryb interaktywny."
+
+#: ../rc.d/init.d/functions:234
+msgid "warning: --check option is ignored!"
+msgstr "ostrzezenie: opcja --check jest ignorowana"
+
+#: ../rc.d/rc.sysinit:226
+msgid "Setting up ISA PNP devices"
+msgstr "Ustawianie urzadzen ISA PNP"
+
+#: ../rc.d/init.d/timezone:47
+msgid "Unsetting time zone information"
+msgstr "Deaktywowanie informacji o strefie czasowej"
+
+#: ../rc.d/init.d/network:151
+msgid "Unmounting NFS filesystems"
+msgstr "Odlaczanie systemow plikow NFS"
+
+#: ../rc.d/init.d/network:168
+msgid "Shutting down interface from LDAP"
+msgstr "Deaktywowanie interfejsu z LDAP"
+
+#: ../rc.d/rc:181 ../rc.d/rc:185
+msgid "On the next boot fsck will be skipped."
+msgstr "Przy nastepnym starcie systemu program fsck bedzie pominiety."
+
+#: ../rc.d/init.d/functions:189
+msgid "DIED"
+msgstr " ZGINAL "
+
+#: ../rc.d/rc.shutdown:32
+msgid "Turning off swap and accounting"
+msgstr "Wylaczanie swap i zliczania"
+
+#: ../rc.d/rc.sysinit:155
+msgid "NIS Domain:"
+msgstr "Domena NIS:"
+
+#: ../rc.d/init.d/functions:125
+msgid "Stopping %s service"
+msgstr "Zatrzymywanie uslugi %s"
+
+#: ../rc.d/init.d/functions:504
+msgid "Loading %s kernel module(s)"
+msgstr "Ladowanie modulu(ow) %s jadra"
+
+#: ../rc.d/init.d/network:186
+msgid "Configured devices:"
+msgstr "Skonfigurowane urzadzenia sieciowe:"
+
+#: ../rc.d/rc.sysinit:72
+msgid "Mounting Device Filesystem"
+msgstr "Podlaczenie systemu plikow urzadzen."
+
+#: ../rc.d/init.d/functions:140
+msgid "Usage: %s"
+msgstr "Uzycie: %s"
+
+#: ../rc.d/rc.sysinit:518
+msgid "Enabling swap space"
+msgstr "Wlaczanie swapa"
+
+#: ../rc.d/rc.shutdown:36
+msgid "Turning off quotas for local filesystems"
+msgstr "Wlaczanie quoty na lokalnych systemach plikow"
+
+#: ../rc.d/rc.sysinit:140 ../rc.d/rc.sysinit:454
+msgid "Setting clock"
+msgstr "Ustawianie zegara systemowego"
+
+#: ../rc.d/rc.sysinit:208 ../rc.d/rc.sysinit:441
+msgid "Automatic reboot in progress."
+msgstr "Automatyczny restart w toku."
+
+#: ../sysconfig/network-scripts/tnlup:25
+msgid "usage: tnlup <device name>"
+msgstr "uzycie: tnlup <nazwa urzadzenia>"
+
+#: ../rc.d/init.d/functions:393
+msgid "%s dead but pid file exists"
+msgstr "%s zabity ale plik z numerem procesu istnieje"
+
+#: ../sysconfig/network-scripts/ifup:16
+msgid "usage: ifup <device name>"
+msgstr "uzycie: ifup <nazwa urzadzenia>"
+
+#: ../sysconfig/network-scripts/ifup-sl:59
+msgid "does not exist for"
+msgstr "nie istnieje dla"
+
+#: ../rc.d/init.d/network:191
+msgid "Currently inactive devices and tunnels:"
+msgstr "Nie aktywne urzadzenia sieciowe i tunele:"
+
+#: ../sysconfig/network-scripts/ifup:70
+msgid "Enslaving %s to %s"
+msgstr "Enslaving %s na %s"
+
+#: ../rc.d/init.d/network:47
+msgid "Setting network parameters"
+msgstr "Ustawianie parametrow sieci"
+
+#: ../rc.d/init.d/network:135
+msgid "Bringing up tunnel interface"
+msgstr "Podnoszenie interfejsu tunelu"
+
+#: ../rc.d/rc.sysinit:398
+msgid "Automatic reboot in progress"
+msgstr "Automatyczny restart w toku"
+
+#: ../rc.d/rc.sysinit:412
+msgid "Scanning for LVM volume groups"
+msgstr "Wyszukiwanie grup woluminow LVM"
+
+#: ../sysconfig/network-scripts/ifup-ppp:36
+msgid "/usr/sbin/pppd does not exist or is not executable for %s"
+msgstr "/usr/sbin/pppd nie istnieje lub nie jest wykonywalny dla %s"
+
+#: ../rc.d/init.d/functions.network:212
+msgid "Enabling IPv6 packed forwarding"
+msgstr "Aktywowanie przekazywanie pakietow IPv6"
+
+#: ../rc.d/init.d/functions:165
+msgid "BUSY"
+msgstr " ZAJETY "
+
+#: ../rc.d/init.d/single:34 ../rc.d/rc.shutdown:26
+msgid "Sending all processes the KILL signal"
+msgstr "Wysylanie do wszystkich procesow sygnalu KILL"
+
+#: ../rc.d/init.d/network:126
+msgid "Bringing up interface"
+msgstr "Podnoszenie interfejsu"
+
+#: ../rc.d/init.d/network:188
+msgid "Configured tunnels:"
+msgstr "Skonfigurowane tunele:"
+
+#: ../sysconfig/network-scripts/ifup-sl:44
+msgid "/usr/sbin/dip does not exist or is not executable"
+msgstr "/usr/sbin/dip nie istnieje lub nie jest wykonywalny"
+
+#: ../rc.d/init.d/functions:521
+msgid "Could not load %s kernel module(s)"
+msgstr "Nie mozna zaladowac modulu(ow) %s jadra"
+
+#: ../rc.d/init.d/functions.network:214
+msgid "Disabling IPv6 packed forwarding"
+msgstr "Deaktywowanie przekazywania pakietow IPv6"
+
+#: ../rc.d/rc.sysinit:328
+msgid "Loading sound module"
+msgstr "Ladowanie modul obslugi dzwieku"
+
+#: ../rc.d/rc.sysinit:141 ../rc.d/rc.sysinit:455
+msgid "Today's date:"
+msgstr "Dzisiejsza data:"
+
+#: ../rc.d/init.d/network:163
+msgid "Shutting down tunnel interface"
+msgstr "Deaktywowanie interfejsu tunelu"
+
+#: ../rc.d/rc:184
 msgid "Please stand by while rebooting the system"
 msgstr "Prosze czekac - restart system"
 
-#: ../rc.d/rc.sysinit:143
+#: ../rc.d/rc.sysinit:151
 msgid "Host:"
 msgstr "Host:"
 
-#: ../rc.d/init.d/random:22
-msgid "Initializing random number generator"
-msgstr "Inicjalizacja generatora liczb losowych"
-
-#: ../rc.d/init.d/functions:156
+#: ../rc.d/init.d/functions:182
 msgid "FAIL"
 msgstr "PROBLEMY"
 
-#: ../rc.d/init.d/functions.network:272
-msgid "Setting default local port range"
-msgstr "Ustawienie domyslnego zakresu portow lokalnych"
-
-#: ../rc.d/rc.shutdown:69
+#: ../rc.d/rc.shutdown:74
 msgid "Turning off RAID for %s"
-msgstr "Wylaczenie obslugi RAID dla %s"
+msgstr "Wylaczanie obslugi RAID dla %s"
 
-#: ../rc.d/rc.sysinit:386
-msgid "Mounting local filesystems."
-msgstr "Podlaczenie lokalnych systemow plikow."
-
-#: ../rc.d/rc.sysinit:355
-msgid "Checking filesystems."
-msgstr "Sprawdzenie systemow plikow."
+#: ../rc.d/rc.sysinit:236
+msgid "Checking root filesystem quotas"
+msgstr "Sprawdzanie quoty na glownym systemie plikow"
 
-#: ../rc.d/rc.sysinit:308 ../rc.d/rc.sysinit:332 ../rc.d/rc.sysinit:350
+#: ../rc.d/rc.sysinit:382 ../rc.d/rc.sysinit:400
 msgid "Starting up RAID devices."
 msgstr "Ustawianie urzadzen RAID"
 
-#: ../rc.d/rc.sysinit:220
-msgid "Checking root filesystem quotas"
-msgstr "Sprawdzanie quota na glownym systemie plikow"
+#: ../rc.d/rc.sysinit:419
+msgid "Checking filesystems."
+msgstr "Sprawdzanie systemow plikow."
+
+#: ../rc.d/init.d/functions.network:167 ../rc.d/init.d/functions.network:169
+msgid "Setting static ARP entries"
+msgstr "Ustawianie statycznej tablicy ARP"
 
-#: ../rc.d/rc.sysinit:404
+#: ../rc.d/rc.sysinit:469
 msgid "Setting %s seconds for kernel reboot after panic."
 msgstr "Restart system po %s sekundach od zawieszenia sie jadra."
 
-#: ../rc.d/rc.sysinit:178 ../rc.d/rc.sysinit:363
+#: ../rc.d/rc.sysinit:194 ../rc.d/rc.sysinit:427
 msgid "*** An error occurred during the file system check."
 msgstr ""
 "*** Podczas sprawdzania systemow plikow wykryto blad niemozliwy do usuniecia."
 
-#: ../rc.d/init.d/functions:176 ../rc.d/init.d/timezone:39
-#: ../rc.d/init.d/timezone:42 ../rc.d/rc.shutdown:70
-msgid "$MESSAGE"
-msgstr "$MESSAGE"
-
-#: ../rc.d/rc.sysinit:334
+#: ../rc.d/rc.sysinit:384
 msgid "*** An error occurred during the RAID startup"
 msgstr ""
 "*** Podczas inicjacji urzadzen RAID wykryto blad niemozliwy do usuniecia."
 
-#: ../rc.d/init.d/allowlogin:22
-msgid "Allowing users to login"
-msgstr "Pozwalenie uzytkownikom na logowanie sie"
-
-#: ../rc.d/rc.sysinit:281
-msgid "Finding module dependencies"
-msgstr "Wyszukiwanie powiazan pomiedzy modulami"
-
-#: ../rc.d/init.d/functions:358
+#: ../rc.d/init.d/functions:399
 msgid "%s dead but subsys locked"
 msgstr "%s zabity ale podsystem zablokowany"
 
-#: ../rc.d/rc.shutdown:42 ../rc.d/rc.sysinit:190 ../rc.d/rc.sysinit:346
-#: ../rc.d/rc.sysinit:375
-msgid "Unmounting file systems"
-msgstr "Odlaczenie systemow plikow"
-
-#: ../rc.d/init.d/single:32 ../rc.d/rc.shutdown:24
-msgid "Sending all processes the TERM signal"
-msgstr "Wysylanie do wszystkich procesow sygnalu TERM"
-
-#: ../rc.d/init.d/functions.network:202 ../rc.d/init.d/functions.network:213
-msgid "Setting %s to %s"
-msgstr "Ustawienie %s na %s"
-
-#: ../rc.d/rc.sysinit:140
+#: ../rc.d/rc.sysinit:148
 msgid "Activating swap partitions"
-msgstr "Aktywacja partycji swap"
+msgstr "Aktywowanie partycji swap"
 
-#: ../rc.d/init.d/functions:361
-msgid "%s is stopped"
-msgstr "%s jest zatrzymany"
+#: ../sysconfig/network-scripts/ifup-aliases:14
+msgid "usage: %s <device name>"
+msgstr "uzycie: %s <nazwa urzadzenia>"
 
 #: ../rc.d/init.d/allowlogin:28
 msgid "System shutdown in progress \n"
 msgstr "Zamykanie systemu w toku \n"
 
-#: ../rc.d/rc.sysinit:89
-msgid "Turning off Stop-A/Break-A"
-msgstr "Wylaczam klawisz Stop-A/Break-A"
-
-#: ../rc.d/init.d/functions.network:263
-msgid "Setting local port range"
-msgstr "Ustawienie zakresu portow lokalnych"
-
-#: ../rc.d/rc.sysinit:183 ../rc.d/rc.sysinit:368
-msgid "(Repair filesystem)# "
-msgstr "(Naprawa systemu plikow)# "
-
-#: ../rc.d/rc:178 ../rc.d/rc:179
+#: ../rc.d/rc:197 ../rc.d/rc:198
 msgid "%sResource Manager: %sRunlevel has been reached"
 msgstr "%sZarzadca zasobow: %sZostal osiagniety poziom"
 
-#: ../rc.d/init.d/functions:93
-msgid "ERROR: Networking is down. %s can't be run."
-msgstr "BLAD: Siec nie jest uruchomiona. %s nie moze zostac uruchomiony."
-
-#: ../rc.d/rc.sysinit:179 ../rc.d/rc.sysinit:335 ../rc.d/rc.sysinit:364
-msgid "*** Dropping you to a shell; the system will reboot"
-msgstr "*** Uruchamiam powloke; system zostanie zrestartowany"
+#: ../rc.d/init.d/network:164
+msgid "Removing tunnel"
+msgstr "Usuwanie tunelu"
 
-#: ../rc.d/init.d/functions:118
+#: ../rc.d/init.d/functions:135
 msgid "Reloading %s service"
-msgstr "Przeladowanie uslugi %s"
+msgstr "Przeladowywanie uslugi %s"
 
-#: ../rc.d/rc:92 ../rc.d/rc:93
+#: ../rc.d/init.d/network:172
+msgid "Shutting down interface"
+msgstr "Deaktywowanie interfeju"
+
+#: ../rc.d/rc:111 ../rc.d/rc:112
 msgid "%sResource Manager: %sEntering runlevel number"
 msgstr "%sZarzadca zasobow: %sWejscie na poziom"
 
-#: ../rc.d/init.d/functions:367
-msgid "Start service"
-msgstr "Uruchomiono usluge"
-
-#: ../rc.d/rc.shutdown:77
-msgid "Remounting remaining filesystems ro mode"
-msgstr "Przelaczenie pozostalych systemow plikow w tryb tylko do odczytu"
+#: ../sysconfig/network-scripts/ifup-ppp:33
+msgid "/usr/sbin/pppd does not exist or is not executable"
+msgstr "/usr/sbin/pppd nie istnieje lub nie jest wykonywalny"
 
-#: ../rc.d/init.d/functions.network:169
-msgid "Starting network router discovery daemon"
-msgstr ""
-
-#: ../rc.d/init.d/functions:150
+#: ../rc.d/init.d/functions:176
 msgid "WORK"
 msgstr "AKTYWUJE"
 
-#: ../rc.d/init.d/functions:130
-msgid "$@"
-msgstr "$@"
-
-#: ../rc.d/rc.sysinit:292
-msgid "Loading synthesiser module"
-msgstr "Ladowanie modul syntetyzera"
-
-#: ../rc.d/init.d/functions:113
-msgid "%s service is not running."
-msgstr "Usluga %s nie jest uruchomiona."
-
-#: ../rc.d/rc.sysinit:229
+#: ../rc.d/rc.sysinit:245
 msgid "System bootup in progress  - please wait"
 msgstr "Start systemu w toku - prosze czekac"
 
-#: ../rc.d/rc.sysinit:135
-#, fuzzy
-msgid "Setting clock$CLOCKDEF"
-msgstr "Ustawienie zegara systemowego"
-
 #: ../rc.d/init.d/random:40
 msgid "Saving random seed"
-msgstr "Zapisanie podstawy generatora losowego"
+msgstr "Zapisywanie podstawy generatora losowego"
 
-#: ../rc.d/rc.sysinit:395
+#: ../rc.d/rc.sysinit:460
 msgid "Turning on quotas for local filesystems"
-msgstr "Wlaczam quote na lokalnych systemach plikow"
+msgstr "Wlaczanie quoty na lokalnych systemach plikow"
 
-#: ../rc.d/rc:71
-msgid "Entering interactive startup"
-msgstr "Wchodze w tryb interaktywny"
+#: ../sysconfig/network-scripts/ifup-sl:96
+msgid "slattach started for %s on %s at %s"
+msgstr ""
 
 #: ../rc.d/init.d/random:53
 msgid "The random data source exists"
 msgstr "Zrodlo losowych danych istnieje"
 
-#: ../rc.d/rc.sysinit:57
-msgid "Press"
-msgstr "Prosze wcisnac"
-
-#: ../rc.d/rc.sysinit:83
-msgid "Turning off Magic SysRq key"
-msgstr "Wylaczenie klawisza Magic SysRq"
-
-#: ../rc.d/rc.sysinit:210
-msgid "Setting up ISA PNP devices"
-msgstr "Ustawienie urzadzen ISA PNP"
-
-#: ../rc.d/init.d/timezone:47
-msgid "Unsetting time zone information"
-msgstr ""
-
-#: ../rc.d/rc:162 ../rc.d/rc:166
-msgid "On the next boot fsck will be skipped."
-msgstr "Przy nastepnym starcie systemu program fsck bedzie pominiety."
+#: ../rc.d/rc:90
+msgid "Entering interactive startup"
+msgstr "Wchodzenie w tryb interaktywny"
 
-#: ../rc.d/init.d/functions:162
-msgid "DIED"
-msgstr " ZGINAL "
+#: ../sysconfig/network-scripts/ifup-sl:47
+msgid "/usr/sbin/dip does not exist or is not executable for"
+msgstr "/usr/sbin/dip nie istnieje lub nie jest wykonywalny dla"
 
-#: ../rc.d/init.d/functions.network:245
-msgid "Disabling dynamic IP patch"
+#: ../rc.d/rc.sysinit:60
+msgid "\t\t\t%sPowered by %sPLD GNU/Linux%s"
 msgstr ""
 
-#: ../rc.d/init.d/functions.network:298
-msgid "Setting down IP spoofing protection"
-msgstr ""
+#: ../sysconfig/network-scripts/ifup-sl:66
+msgid "dip started for %s on %s at %s"
+msgstr "dip wystartowany dla %s na %s przy %s"
 
-#: ../rc.d/rc.shutdown:32
-msgid "Turning off swap and accounting"
-msgstr "Wylaczenie swap i zliczania"
+#: ../sysconfig/network-scripts/ifup-sl:45
+msgid "ifup-sl for %s exiting"
+msgstr "ifup-sl dla %s zakanczany"
 
-#: ../rc.d/rc.sysinit:147
-msgid "NIS Domain:"
-msgstr "Domena NIS:"
+#: ../rc.d/init.d/network:130
+msgid "Bringing up interface from LDAP"
+msgstr "Podnoszenie interfejsu z LDAP"
 
-#: ../rc.d/init.d/functions:108
-msgid "Stopping %s service"
-msgstr "Zatrzymywanie uslugi %s"
+#: ../sysconfig/network-scripts/ifup:99
+msgid "Can't find a dhcp client."
+msgstr "Nie mozna znalesc klienta dhcp."
 
-#: ../rc.d/init.d/network:196
+#: ../rc.d/init.d/network:193
 msgid "Currently active devices and tunnels:"
 msgstr "Aktywne urzadzenia sieciowe i tunele:"
 
-#: ../rc.d/rc.sysinit:379
+#: ../rc.d/rc.sysinit:443
 msgid "Checking filesystem quotas"
-msgstr "Sprawdzenie quota w systemach plikow"
-
-#: ../rc.d/rc.sysinit:390
-msgid "Loading default system font"
-msgstr "Ladowanie podstawowej czcionki systemowej"
+msgstr "Sprawdzanie quoty w systemach plikow"
 
-#: ../rc.d/rc:172
+#: ../rc.d/rc:191
 msgid "Setting up /etc/ld.so.cache"
-msgstr "Ustawienie /etc/ld.so.cache"
-
-#~ msgid "Loading midi module"
-#~ msgstr "Ladowanie modul obslugi midi"
-
-
-#~ msgid "Date set to"
-#~ msgstr "Data ustawiona na"
-
-#~ msgid "to enter interactive startup."
-#~ msgstr "zeby wejsc w tryb interaktywny"
-
-# (4 + "\b" * count of letters) in one of five previous words
-#~ msgid "\b\b\b\b\b\b\b\b"
-#~ msgstr "\b\b\b\b\b\b\b\b\b\b\b\b"
+msgstr "Ustawianie /etc/ld.so.cache"
index 1f407d0b825f3cb62833d12636f686a6263a10e7..035b2d50d2bb9482cca45b15dc3c81783aeb3feb 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: rc-scripts.spec.in,v 1.48 2000/05/07 18:59:59 siefca Exp $
+# $Id: rc-scripts.spec.in,v 1.48.2.1 2000/10/18 20:10:45 misiek Exp $
 Summary:       inittab and /etc/rc.d scripts
 Summary(de):   inittab und /etc/rc.d Scripts
 Summary(fr):   inittab et scripts /etc/rc.d
@@ -17,6 +17,7 @@ BuildRequires:        popt-devel
 BuildRequires: glib-devel
 BuildRequires: glib-static
 BuildRequires: gettext-devel
+Requires:      grep
 Requires:      mingetty
 Requires:      mktemp
 Requires:      modutils >= 2.1.121
@@ -28,7 +29,6 @@ Requires:     /bin/awk
 Requires:      procps
 Requires:      /bin/ps
 Requires:      SysVinit
-Requires:      sed
 Requires:      iproute2
 Requires:      /bin/gettext
 Requires:      e2fsprogs >= 1.15
@@ -201,6 +201,7 @@ fi
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/adjtime
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/inittab
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/initlog.conf
+%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/modules
 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/system
 
 %{_mandir}/man1/*
index b13eed2da897600b09a7af5fd14fbaa36ad0a475..0af40bb62813991bb7116cc03407d9dcf425adb9 100644 (file)
@@ -7,6 +7,7 @@ rcdir = @rcdir@
 rc_SCRIPTS = \
        rc \
        rc.local \
+       rc.modules \
        rc.sysinit \
        rc.shutdown \
        rc.init
index 1fae259602c6b1aa648f3c365bdc15b4f2fec787..6fb3f0ba59b60f677e9f8ed7233a22ed2bd0be24 100644 (file)
@@ -4,7 +4,7 @@
 #
 # description: Allow users to login.
 #
-# $Id: allowlogin,v 1.8 2000/06/12 08:38:15 waszi Exp $
+# $Id: allowlogin,v 1.8.2.1 2000/10/18 20:10:50 misiek Exp $
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -37,3 +37,7 @@ case "$1" in
 esac
 
 exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 4f7c97a6ac97fb4aa0b1c3ae921774f3a1bc72fb..121c52c1e0bb02f2921311e7b10dfe69a4d39b1e 100644 (file)
@@ -1,7 +1,7 @@
 # functions    This file contains functions to be used by most or all
 #              shell scripts in the /etc/init.d directory.
 #
-# $Id: functions,v 1.54 2000/07/28 18:37:00 baggins Exp $
+# $Id: functions,v 1.54.2.1 2000/10/18 20:10:50 misiek Exp $
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Hacked by:    Greg Galloway and Marc Ewing
@@ -17,7 +17,7 @@ export PATH="/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin"
 INIT_COL=67
 
 # Source configuration if available - may override default values
-[ -f /etc/sysconfig/system ] && . /etc/sysconfig/system
+[ -r /etc/sysconfig/system ] && . /etc/sysconfig/system
 
 [ -z "$COLUMNS" ] && COLUMNS=80
 
@@ -39,6 +39,9 @@ termput()
                  setaf)
                        is_yes "$COLOR_INIT" && echo -ne "\033[0;3${2}m"
                        ;;
+                 op)
+                       termput setaf 9
+                       ;;
                  esac
        else
                tput "$@"
@@ -48,6 +51,7 @@ termput()
 # printf equivalent
 printf_()
 {
+       local text m
        text="$1" ;
        shift ;
        if [ $# -gt 0 ]; then
@@ -64,33 +68,45 @@ printf_()
 # National language support function
 nls()
 {
-if [ -x /bin/gettext -o -x /usr/bin/gettext ]; then
-       OLD_NLS_DOMAIN="$NLS_DOMAIN"
-       if [ "$1" = "--nls-domain" ]; then
-               shift
-               NLS_DOMAIN="$1"
-               shift
-       fi
-       if [ -z "$NLS_DOMAIN" ]; then
-               NLS_DOMAIN="rc-scripts"
+       local msg_echo old_nls_domain text message
+       msg_echo='\n'
+       old_nls_domain="$NLS_DOMAIN"
+       # parse command line
+       # don't use -o instead || here - this will broke ksh --misiek
+       while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do
+               case "$1" in
+                       --nls-domain)
+                               shift
+                               NLS_DOMAIN="$1"
+                               shift
+                               ;;
+                       -n)
+                               msg_echo=''
+                               shift
+                               ;;
+               esac
+       done
+       message="$1"
+       shift
+       # empty message, so we return --misiek
+       if [ -z "$message" ]; then
+               NLS_DOMAIN="$old_nls_domain"
+               echo -en "$msg_echo"
+               return
        fi
-       MESSAGE="$1"
-       # avoid translating empty text. --misiek
-       if [ -n "$MESSAGE" ]; then
-               text="`TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="$NLS_DOMAIN" "$MESSAGE"`"
+                       
+       if [ -x /bin/gettext -o -x /usr/bin/gettext ]; then
+               text=$(TEXTDOMAINDIR="/etc/sysconfig/locale" gettext -e --domain="${NLS_DOMAIN:-rc-scripts}" "$message")
+               printf_ "$text" "$@"
        else
-               text="$MESSAGE"
+               printf_ "$message" "$@"
        fi
-       shift
-       printf_ "$text" "$@"
-       echo
-       NLS_DOMAIN="$OLD_NLS_DOMAIN"
-else
-       echo "$@"
-fi
+       
+       echo -en "$msg_echo"
+       NLS_DOMAIN="$old_nls_domain"
 }
 
-msg_Network_Down()
+msg_network_down()
 {
        nls "ERROR: Networking is down. %s can't be run." "$1"
 }
@@ -100,7 +116,7 @@ msg_starting()
        show "Starting %s service" "$1"
 }
 
-msg_Already_Running()
+msg_already_running()
 {
        nls "%s service is already running." "$1"
 }
@@ -110,7 +126,7 @@ msg_stopping()
        show "Stopping %s service" "$1"
 }
 
-msg_Not_Running()
+msg_not_running()
 {
        nls "%s service is not running." "$1"
 }
@@ -120,16 +136,15 @@ msg_reloading()
        show "Reloading %s service" "$1"
 }
 
-msg_Usage()
+msg_usage()
 {
        nls "Usage: %s" "$*"
 }
 
 # Some functions to handle PLD-style messages
 show() 
-{      
-       what="`nls --nls-domain rc-scripts "DONE"`"; typeset -i offset=${#what}
-       text="`nls "$@"`"
+{      local text
+       text=$(nls "$@")
        echo -n "$text"
        awk "BEGIN { for (j=length(\"$text\"); j<$INIT_COL; j++) printf \".\" }"
 }
@@ -140,9 +155,10 @@ show()
 # used).
 progress()
 {
+       local COLOR
        if [ -n "$2" ]; then COLOR="$2"; else COLOR="2"; fi
        deltext
-       echo -n "`termput setaf 6`[`termput setaf "$COLOR"` `nls --nls-domain rc-scripts "$1"` `termput setaf 6`]`termput op`"
+       echo -n "$(termput setaf 6)[$(termput setaf "$COLOR") $(nls --nls-domain rc-scripts "$1") $(termput setaf 6)]$(termput op)"
 }
 
 busy() 
@@ -166,12 +182,14 @@ fail()
 {
        progress "FAIL" 1
        echo
+       return 1
 }
 
 died() 
 {
        progress "DIED" 1
        echo
+       return 1
 }
 
 deltext() 
@@ -182,43 +200,59 @@ deltext()
 # Usage run_cmd Message command_to_run
 run_cmd()
 {
-       exit_code=0
-       _ERRORS=""
-       MESSAGE=$1
-       show "$MESSAGE"; busy
+       local exit_code errors message force_err
+       typeset -i force_err=0
+       typeset -i exit_code=0
+       case "$1" in
+               -a)
+                       force_err=1
+                       shift
+                       ;;
+       esac
+       message=$1
+       show "$message"; busy
        shift
-       if _ERRORS="`initlog -c \"$*\" 2>&1`"; then
+       if errors=$(HOME=/tmp TMPDIR=/tmp initlog -c "$*" 2>&1); then
                ok
+               log_success "$1 $message"
        else
-               fail;  [ -n "$_ERRORS" ] && echo $_ERRORS
+               fail
+               log_failed "$1 $message"
                exit_code=1
        fi
-       unset _ERRORS
+       [ -n "$errors" ] && [ $exit_code -eq 1 -o $force_err -eq 1 ] && echo $errors
        return $exit_code
 }
 
-# compatibility functions
-action()
-{
-        STRING=$1
-       shift
-       run_cmd "$STRING" "$*"
-}
-                       
 # A function to start a program (now it's usefull on read-only filesystem too)
 daemon() 
 {
-       nicelevel=0
-       exit_code=0
-       _ERRORS=""
+       local nicelevel exit_code errors prog
+       typeset -i nicelevel=0
+       typeset -i exit_code=0
        [ -z "$DEFAULT_SERVICE_RUN_NICE_LEVEL" ] && DEFAULT_SERVICE_RUN_NICE_LEVEL=0
-       # Test syntax.
-       case $1 in
-       '')     msg_Usage " daemon [+/-nicelevel] {program}"
-               return 1;;
-       -*|+*) SERVICE_RUN_NICE_LEVEL=$1
-               shift;;
-       esac
+       # Test syntax. Don't use -o instead || here - this will broke ksh --misiek
+       while [ "$1" != "${1##-}" ] || [ "$1" != "${1##+}" ]; do
+               case $1 in
+               '')     msg_usage " daemon [--user user] [+/-nicelevel] {program}"
+                       return 1
+                       ;;
+               --check)
+                       # for compatibility with redhat/mandrake
+                       nls "warning: --check option is ignored!"
+                       shift
+                       shift
+                       ;;
+               --user)
+                       shift
+                       prog="/bin/su $1 -c"
+                       shift
+                       ;;
+               -*|+*) SERVICE_RUN_NICE_LEVEL=$1
+                       shift;;
+               esac
+       done
+       prog="$prog "$*""
 
        # make sure it doesn't core dump anywhere; while this could mask
        # problems with the daemon, it also closes some security problems
@@ -226,31 +260,33 @@ daemon()
 
        # And start it up.
        busy
-       if _ERRORS="`nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$*" 2>&1`"; then
+       if errors=$(HOME=/tmp TMPDIR=/tmp nice -n ${SERVICE_RUN_NICE_LEVEL:-$DEFAULT_SERVICE_RUN_NICE_LEVEL} initlog -c "$prog" 2>&1); then
+               log_success "$1 startup"
                ok
        else
                exit_code=1
                fail
-               [ -n "$_ERRORS" ] && echo $_ERRORS
+               log_failed "$1 startup"
+               [ -n "$errors" ] && echo $errors
        fi
-       unset _ERRORS
        return $exit_code
 }
 
 # A function to stop a program.
 killproc() 
 {
+       local notset killlevel base pid
        # Test syntax.
        if [ $# = 0 ]; then
-               msg_Usage " killproc {program} [signal]"
+               msg_usage " killproc {program} [signal]"
                return 1
        fi
 
        busy
        
-       notset=0
+       typeset -i notset=0
        # check for second arg to be kill level
-       if [ "$2" != "" ] ; then
+       if [ -n "$2" ] ; then
                killlevel=$2
        else
                notset=1
@@ -258,13 +294,13 @@ killproc()
        fi
 
         # Save basename.
-        base=`basename $1`
+        base=$(basename $1)
 
         # Find pid.
-        pid=`pidofproc $base`
+        pid=$(pidofproc $base)
 
         # Kill it.
-        if [ "$pid" != "" ] ; then
+        if [ -n "$pid" ] ; then
                if [ "$notset" = "1" ] ; then
                        if ps h $pid>/dev/null 2>&1; then
                                # TERM first, then KILL if not dead
@@ -279,20 +315,35 @@ killproc()
                                                fi
                                        fi
                                fi
-                               ps h $pid >/dev/null 2>&1 && fail || ok
+                               if (ps h $pid >/dev/null 2>&1); then
+                                  fail
+                                  log_failed "$1 shutdown"
+                               else
+                                  ok
+                                  log_success "$1 shutdown"
+                               fi
                        else
                                died
+                               log_failed "$1 shutdown"
                        fi
                # use specified level only
                else
                        if ps h $pid >/dev/null 2>&1; then
-                               kill $killlevel $pid && ok || fail
+                               if (kill $killlevel $pid); then
+                                  ok
+                                  log_success "$1 shutdown"
+                               else
+                                  fail
+                                  log_failed "$1 shutdown"
+                               fi
                        else
                                died
+                               log_failed "$1 shutdown"
                        fi
                fi
        else
                died
+               log_failed "$1 shutdown"
        fi
 
         # Remove pid file if any.
@@ -304,63 +355,49 @@ killproc()
 # A function to find the pid of a program.
 pidofproc() 
 {
+       local pid
        # Test syntax.
        if [ $# = 0 ] ; then
-               msg_Usage " pidofproc {program}"
+               msg_usage " pidofproc {program}"
                return 1
        fi
 
        # First try "/var/run/*.pid" files
        if [ -f /var/run/$1.pid ] ; then
-               pid=`head -1 /var/run/$1.pid`
-               if [ "$pid" != "" ] ; then
+               pid=$(head -1 /var/run/$1.pid)
+               if [ -n "$pid" ] ; then
                        echo $pid
                        return 0
                fi
        fi
 
        # Next try "pidof"
-       pid=`pidof $1`
-       if [ "$pid" != "" ] ; then
+       pid=$(pidof -o $$ -o $PPID -o %PPID -x $1)
+       if [ -n "$pid" ] ; then
                echo $pid
                return 0
        fi
-
-        # Finally try to extract it from ps
-        ps ax | awk 'BEGIN { prog=ARGV[1]; ARGC=1 }
-                           { if ((prog == $5) || (("(" prog ")") == $5) ||
-                             (("[" prog "]") == $5) ||
-                           ((prog ":") == $5)) { print $1 ; exit 0 } }' $1
 }
 
 status() 
 {
        # Test syntax.
        if [ $# = 0 ] ; then
-               msg_Usage " status {program}"
+               msg_usage " status {program}"
                return 1
        fi
 
        # First try "pidof"
-       pid=`pidof $1`
-       if [ "$pid" != "" ] ; then
+       pid=$(pidof -o $$ -o $PPID -o %PPID -x $1)
+       if [ -n "$pid" ] ; then
                nls "%s (pid %s) is running..." "$1" "$pid"
                return 0
-        else
-                pid=`ps ax | awk 'BEGIN { prog=ARGV[1]; ARGC=1 }
-                           { if ((prog == $5) || (("(" prog ")") == $5) ||
-                             (("[" prog "]") == $5) ||
-                           ((prog ":") == $5)) { print $1 ; exit 0 } }' $1`
-                if [ "$pid" != "" ] ; then
-                        nls "%s (pid %s) is running..." "$1" "$pid"
-                        return 0
-                fi
        fi
 
        # Next try "/var/run/*.pid" files
        if [ -f /var/run/$1.pid ] ; then
-               pid=`head -1 /var/run/$1.pid`
-               if [ "$pid" != "" ] ; then
+               pid=$(head -1 /var/run/$1.pid)
+               if [ -n "$pid" ] ; then
                        nls "%s dead but pid file exists" "$1"
                        return 1
                fi
@@ -376,7 +413,8 @@ status()
 
 # Confirm whether we really want to run this service
 confirm() {
-       echo -n "`nls "Start service"` $1 `nls "(Y)es/(N)o/(C)ontinue? [Y] "`"
+       local answer
+       nls -n "Start service %s (Y)es/(N)o/(C)ontinue? [Y] " "$1"
        read answer
        case $answer in
                y|Y|t|T|"")
@@ -399,51 +437,58 @@ is_yes()
 {
        # Test syntax   
        if [ $# = 0 ] ; then
-               msg_Usage " is_yes {value}"
+               msg_usage " is_yes {value}"
                return 2
        fi
 
-       # Check value
-       [ "$1" = "yes" ] ||\
-       [ "$1" = "Yes" ] ||\
-       [ "$1" = "YES" ] ||\
-       [ "$1" = "true" ] ||\
-       [ "$1" = "True" ] ||\
-       [ "$1" = "TRUE" ] ||\
-       [ "$1" = "Y" ]||\
-       [ "$1" = "y" ]||\
-       [ "$1" = "1" ] ||\
-               return 1
-       return 0
+       case "$1" in
+               yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
+                       # true returns zero
+                       return 0
+               ;;
+               *)
+                       # false returns one
+                       return 1
+               ;;
+       esac
 }
 
 is_no()
 {
        # Test syntax
-       if [ $# = 0 ] ; then
-               msg_Usage " is_no {value}"
+       if [ $# = "0" ] ; then
+               msg_usage " is_no {value}"
                return 2
        fi
-       
-       # Check value
-       [ "$1" = "no" ] ||\
-       [ "$1" = "No" ] ||\
-       [ "$1" = "NO" ] ||\
-       [ "$1" = "false" ] ||\
-       [ "$1" = "False" ] ||\
-       [ "$1" = "FALSE" ] ||\
-       [ "$1" = "N" ] ||\
-       [ "$1" = "n" ] ||\
-       [ "$1" = "0" ] ||\
-       [ "$1" = "" ] ||\
+
+       # It's important that is_no() should always return logical
+       # negation of is_yes(). Really ALWAYS. --misiek
+       if is_yes "$1" ; then
                return 1
-       return 0
+       else
+               return 0
+       fi
+}
+
+# module is needed (ie. is requested, is available and isn't loaded already)
+is_module()
+{
+       # module name without .o at end
+       if ! (lsmod | grep -q "$1"); then
+               if (ls -R /lib/modules/$(uname -r)/ 2> /dev/null | grep -q "${1}.o"); then
+                       # true
+                       return 0
+               fi
+       fi
+       # false
+       return 1
 }
 
 _modprobe()
 {
+       local parsed single die args foo result
        parsed=no
-       while is_no $parsed ; do
+       while is_no "$parsed" ; do
                case "$1" in
                        "single")
                                single=yes
@@ -465,7 +510,6 @@ _modprobe()
        if is_yes "${single}" ; then
                foo="$@"
                show "Loading %s kernel module(s)" "$foo"
-               unset foo
                busy
        fi
        if [ -x /sbin/modprobe ] ; then
@@ -478,7 +522,7 @@ _modprobe()
        if is_yes "${single}" ; then
                deltext
                if [ $result == "0" ] ; then
-                       is_yes "${single}" && ok
+                       is_yes "$single" && ok
                else
                        fail
                        if is_yes "$die" ; then
@@ -487,5 +531,29 @@ _modprobe()
                        fi
                fi
        fi
-       unset single die args result
 }
+
+log_success ()
+{
+       initlog -n $0 -s "$1 $2" -e 1
+}
+
+log_failed ()
+{
+       initlog -n $0 -s "$1 $2" -e 2
+}
+
+# RedHat/Mandrake specific functions
+action () { STRING=$1; shift; run_cmd "$STRING" "$*"; }
+success () { return 0; }
+failure () { return 1; }
+
+# TO BE REMOVED SOON. --misiek
+msg_Network_Down () { msg_network_down "$*"; }
+msg_Already_Running () { msg_already_running "$*"; }
+msg_Not_Running () { msg_not_running "$*"; }
+msg_Usage () { msg_usage "$*"; }
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/rc.d/init.d/functions.network b/rc.d/init.d/functions.network
deleted file mode 100755 (executable)
index 674f853..0000000
+++ /dev/null
@@ -1,456 +0,0 @@
-#
-# $Id: functions.network,v 1.45 2000/07/21 18:51:45 zagrodzki Exp $
-# 
-# This is not a shell script; it provides functions to network scripts
-# that source it.
-
-# This will work only after starting interface to which LDAP server is connected
-find_ldap_interfaces()
-{
-is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ] || exit 1
-if [ -n "$LDAP_BASE_DN" ] ; then
-       BSWITCH="-b$LDAP_BASE_DN" 
-else
-       BSWITH=""
-fi
-
-QUERY="(&(objectclass=pldinterface)(if_onboot=yes))"
-ldapsearch "$BSWITCH" "$QUERY" if_device | \
-       grep "^if_device=" | sed -e "s/^if_device=//"
-}
-
-# find aliases for device
-find_ldap_aliases()
-{
-is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ] || exit 1
-if [ -n "$LDAP_BASE_DN" ] ; then
-       BSWITCH="-b$LDAP_BASE_DN" 
-else
-       BSWITH=""
-fi
-
-QUERY="(&(objectclass=pldinterface)(if_onboot=yes)(if_device~=$1:*))"
-ldapsearch "$BSWITCH" "$QUERY" if_device | \
-       grep "^if_device=" | sed -e "s/^if_device=//"
-}
-
-get_ldap_config ()
-{
-if is_yes "$USE_LDAP" && [ -x /usr/bin/ldapsearch ]; then
-       exit 1
-fi
-
-# Initialise fields which  can have multiple values:
-IPV6_ADDR=""
-IPADDR_ALIASES=""
-
-QUERY="(&(objectclass=pldinterface)(if_device=$1))"
-if [ -n "$LDAP_BASE_DN" ] ; then
-       BSWITCH="-b$LDAP_BASE_DN" 
-else
-       BSWITH=""
-fi
-
-ldapsearch "$BSWITCH" "$QUERY" | grep "=" | sed -e "s/=/ /" | {
-       while read FIELD VALUE ; do
-               # Field, which have name compatible with other 
-               # LDAP object
-               if [ "$FIELD" = "iphostnumber" ] ; then
-                       VAR="IPADDR";
-               else # Other fields
-                       VAR=`echo "$FIELD" | grep "^if_" \
-                            | tr [:lower:] [:upper:] \
-                            | sed -e "s/IF_//"`
-               fi
-               # Fields which can have multiple values:
-               if   [ "$VAR" = "IPV6_ADDR" \
-                   -o "$VAR" = "IPADDR_ALIASES" ]  && \
-                    [ -n "`eval echo \$$VAR`" ] ; then
-                       echo "$VAR=\"\$$VAR $VALUE\"" ;
-
-               # single value fields, or the first value
-               elif [ -n "$VAR" ] ; then
-                       eval "$VAR=\"$VALUE\""
-                       echo "$VAR=\"$VALUE\""
-               fi
-       done
-}
-}
-
-source_config ()
-{
-DEVNAME="`basename "$CONFIG" | sed 's/^ifcfg-//g'`"
-        
-if echo "$CONFIG"|egrep "^/" >/dev/null 2>&1 ; then
-       if [ -f "$CONFIG" ] ; then
-               . "$CONFIG"
-       fi
-elif [ -f "/etc/sysconfig/interfaces/$CONFIG" ] ; then
-       . "/etc/sysconfig/interfaces/$CONFIG"
-elif is_yes "$USE_LDAP"; then
-       eval `get_ldap_config $DEVNAME`
-fi
-}
-
-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()
-{
-hostname=`echo $1 | sed 's/\..*$//'`
-domain=`echo $1 | sed 's/^[^\.]*\.//'`
-
-if [ -n "$hostname" ] ; then
-       echo "$hostname" > /etc/HOSTNAME
-       hostname $hostname
-fi     
-
-if [ -n "$domain" ] ; then
-       >/etc/resolv.conf.new
-       if ! grep -q "search $domain" /etc/resolv.conf ; then
-               echo "search $domain" >> /etc/resolv.conf.new
-       fi
-       echo "domain $domain" >> /etc/resolv.conf.new
-       grep -v "^domain " /etc/resolv.conf >> /etc/resolv.conf.new
-       mv -f /etc/resolv.conf.new /etc/resolv.conf
-fi
-}
-
-# PLD/Linux network functions
-# Copyright (C) 1999, 2000 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
-
-# All functions must be called "name_of_function on" or "name_of_function off"
-
-# Setup Network Address Translation (NAT)
-setup_nat()
-{
-if [ -r /etc/sysconfig/static-nat ]; then
-       grep "^[0-9]" /etc/sysconfig/static-nat | while read src via dst; do
-               if [ "$1" = "on" ]; then
-                       /sbin/ip route add nat $src via $dst
-                       /sbin/ip rule add from $dst nat $src
-               elif [ "$1" = "off" ]; then
-                       /sbin/ip rule del from $dst nat $src
-                       /sbin/ip route del nat $src via $dst
-       fi
-       done
-fi
-}
-
-# network router discovery daemon
-rdisc()
-{
-if is_yes "$IPV6_NETWORKING"; then
-  [ -z "$IPV6_RDISC_MODE" ] && IPV6_RDISC_MODE=host
-  if is_yes "$IPV6_RDISC"; then
-  RDISC_OPTS="-fs"
-       case "$1" in
-       on|start)
-               [ "$IPV6_RDISC_MODE" = "router" ] && \
-               RDISC_OPTS="$RDISC_OPTS -r"
-               run_cmd "Starting network router discovery daemon" \
-                       /usr/sbin/rdisc $RDISC_OPTS
-               ;;
-       off|stop)
-               msg_stopping "network router discovery daemon"
-               killproc rdisc -HUP
-               ;;
-       esac
-  fi
-fi
-}
-
-# proc_net <zmien> <start/stop> <co ustaw> <co default> <nazwa_zmiennej> [komunikat]
-# proc_net ipv4/ip_forward start 1         0            IPV4_FORWARDING  "IPv4 forwarding"
-#
-# wy¶wietli siê komunikat "Setting IPv4 forwarding to 1"
-# je¶li nie podano komunikatu nic nie jest wy¶wietlane
-
-proc_net()
-{
-WHAT="$1"
-TODO="$2"
-SET="$3"
-DEF="$4"
-VAR="$5"
-MESSAGE="$6"
-eval VARD=\$${VAR}
-
-if [ -n "$VARD" -a -e /proc/sys/net/$WHAT ]; then
-       if [ "$TODO" = "start" ]; then
-               is_no "$VARD" && [ "$SET" = "1" ] && SET="$(($SET - 1))"
-               is_yes "$VARD" && [ "$SET" = "0" ] && SET="$(($SET + 1))"
-               if [ -n "$MESSAGE" ]; then
-                       show "`nls "Setting %s to %s" "$MESSAGE" "$SET"`"; busy
-                       if (echo "$SET" > /proc/sys/net/$WHAT) 2> /dev/null; then
-                               deltext; ok
-                       else
-                               deltext; fail
-                       fi
-               else
-                       echo "$SET" > /proc/sys/net/$WHAT
-               fi
-       elif [ "$TODO" = "stop" ]; then
-               if [ -n "$MESSAGE" ]; then
-                       show "`nls "Setting %s to %s" "$MESSAGE" "$DEF"`"; busy
-                       if (echo "$DEF" > /proc/sys/net/$WHAT) 2> /dev/null; then
-                               deltext; ok
-                       else
-                               deltext; fail
-                       fi
-               fi
-       fi
-fi
-return 0
-}
-
-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 is_yes "$IPV4_DYNAMIC_IP_PATCH" && [ "$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 "Disabling 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 is_yes "$IPV4_LOCAL_PORT_RANGE" && [ "$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 is_yes "$IPV4_ANTI_SPOOFING" && [ "$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
-}
-
-#
-# following function sets up routes not associated to any device
-# eg. unreachable or blackhole routes
-# (c) 1999 Jacek Konieczny <jajcus@pld.org.pl>
-#
-setup_routes(){
-
-       if [ -f /etc/sysconfig/static-routes ]; then
-               if [ "$1" = "on" -o "$1" = "yes" ] ; then
-                       egrep "^(none)|(any)[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do
-                               /sbin/ip route add $args
-                       done
-               else
-                       egrep "^(none)|(any)[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do
-                               /sbin/ip route del $args 2>/dev/null
-                       done
-               fi
-       fi
-}
-
-# Add ONLY IPv4 address (IPv6 address is added automaticly)
-set_up_loopback()
-{
-ip link set dev lo up arp on
-ip addr add 127.0.0.1/8 dev lo
-}
-
-set_down_loopback()
-{
-ip addr flush dev lo 2> /dev/null
-ip link set dev lo down
-}
-
-static_arp()
-{
-if is_yes "$STATIC_ARP"; then
-       if [ -r /etc/ethers -a -x /sbin/arp ]; then
-               /sbin/arp -f /etc/ethers
-       fi
-fi
-}
-
-modprobe_net()
-{
-if is_yes "$IPV6_NETWORKING" && [ "`ls -R /lib/modules/\`uname -r\`/ 2>/dev/null | grep ipv6.o`" != "" ]; then
-       modprobe -s -k net-pf-10
-       if is_yes "$IPV6_TUNNELCONFIG" && [ "`ls -R /lib/modules/\`uname -r\`/ 2>/dev/null | grep ipip.o`" != "" ]; then
-               modprobe -s -k ipip
-       fi
-fi
-}
-
-#
-# folowing function calculates network prefix from given network mask
-# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
-#
-calcprefix() {
-local OISF len olen bad prefix
-OISF=$IFS
-IFS="."
-prefix=0
-olen=8
-bad=0
-
-for i in $1; do
-       len=0
-       case $i in
-       255)    len=8 ;;
-       254)    len=7 ;;
-       252)    len=6 ;;
-       248)    len=5 ;;
-       240)    len=4 ;;
-       224)    len=3 ;;
-       192)    len=2 ;;
-       128)    len=1 ;;
-       0)      len=0 ;;
-       *)      len=300 ;;
-       esac
-
-       if [ "$len" -gt "$olen" ] ; then bad=1; fi
-       prefix=$(($prefix + $len))
-       olen=$len
-done
-
-IFS=$OIFS
-if [ "$bad" = "0" ]; then
-       echo "$prefix"
-else
-       echo "32"
-fi
-return
-}
-
-#
-# folowing function calculates network mask from given prefix
-# (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
-#
-calcnetmask() {
-local prefix a MASK
-MASK=""
-if [ "`echo "${1}" | grep "^[0-9]"`" = "" ]; then
-       prefix=32
-else
-       typeset -i prefix=$1
-fi
-for i in 1 2 3 4; do
-       case $prefix in
-       7) a=254 ;;
-       6) a=252 ;;
-       5) a=248 ;;
-       4) a=240 ;;
-       3) a=224 ;;
-       2) a=192 ;;
-       1) a=128 ;;
-       *)
-               if [ $prefix -ge 8 ]; then a=255; fi 
-               if [ $prefix -le 0 ]; then a=0; fi
-               ;;
-       esac
-
-       prefix="$(( $prefix - 8))"
-       if [ -z "$MASK" ]; then
-               MASK=$a
-       else
-               MASK=$MASK.$a
-       fi
-done
-
-echo $MASK
-return
-}
-
-# Retrievies PPPD PID and real interface name from /var/run/ppp-*.pid
-get_ppp_device_and_pid () {
-       
-       if [ -f "/var/run/ppp-$DEVICE.pid" ] ; then
-               eval `{
-                        read PID ; echo "PID='$PID'" 
-                        read REALDEVICE ; echo "REALDEVICE=$REALDEVICE"
-                     } < "/var/run/ppp-$DEVICE.pid"`
-       fi
-       if [ -z "$REALDEVICE" ] ; then
-               REALDEVICE=$DEVICE
-       fi
-}
-
index 052a31746802c01c25645e398c8c12ff895adf45..3d801e56f41c37c31fbc247456cc79bcde8c4981 100644 (file)
@@ -4,7 +4,7 @@
 #
 # description:   kill em all
 #
-# $Id: killall,v 1.6 1999/10/13 16:11:27 baggins Exp $
+# $Id: killall,v 1.6.2.1 2000/10/18 20:10:50 misiek Exp $
 # Bring down all unneeded services that are still running (there shouldn't 
 # be any, so this is just a sanity check)
 
@@ -29,3 +29,7 @@ case "$1" in
        done
        ;;
 esac
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 2d2e34016511c29245e5380677a849f6af561a13..fd54dee23a517cf2bfd4182044a9653ad78d2c2e 100644 (file)
@@ -8,7 +8,9 @@
 #
 # probe:       true
 
-# $Id: network,v 1.34 2000/06/12 08:38:15 waszi Exp $
+# $Id: network,v 1.34.2.1 2000/10/18 20:10:50 misiek Exp $
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -17,14 +19,20 @@ NLS_DOMAIN="rc-scripts"
 . /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
-[ ! -f /etc/sysconfig/network ] && exit 0
+if [ ! -f /etc/sysconfig/network ]; then
+       nls "%s is missing. Can't continue." "/etc/sysconfig/network"
+       exit 1
+fi
 
 . /etc/sysconfig/network
 
 # Check that networking is up.
 is_no "${NETWORKING}" && exit 0
 
-[ -x /sbin/ip ] || exit 0
+if [ ! -x /sbin/ip ]; then
+       nls "%s is missing. Can't continue." "/sbin/ip"
+       exit 1
+fi
 
 ######
 # initialize networking:
@@ -36,33 +44,39 @@ is_no "${NETWORKING}" && exit 0
 # - setup lo interface
 network_init()
 {
+# Kernel network parameters
+run_cmd "Setting network parameters" sysctl -p /etc/sysctl.conf
+
 # Set UP loopback interface
 set_up_loopback
 
 # Modprobe needed devices
 modprobe_net
 
-# Spoofing protection && dynamic IP && port range
-ipv4_anti_spoofing on
-ipv4_dynamic_ip_patch on
-ipv4_local_port_range on
-
-# Others proc/sys/net
-proc_networking start
-
-# Setup NAT rules
+# Setup configuration
+setup_forwarding on
 setup_nat on
 setup_routes on
 
 # Setup IPX
 if is_yes "$IPX"; then
-       if [ ! -z $IPXAUTOPRIMARY ] ; then
+       if [ -n $IPXAUTOPRIMARY ] ; then
+               if is_yes "$IPXAUTOPRIMARY"; then
+                       IPXAUTOPRIMARY="on"
+               else
+                       IPXAUTOPRIMARY="off"
+               fi
                /usr/bin/ipx_configure --auto_primary=$IPXAUTOPRIMARY
        fi
-       if [ ! -z $IPXAUTOFRAME ] ; then
+       if [ -n $IPXAUTOFRAME ] ; then
+               if is_yes "$IPXAUTOFRAME"; then
+                       IPXAUTOFRAME="on"
+               else
+                       IPXAUTOFRAME="off"
+               fi
                /usr/bin/ipx_configure --auto_interface=$IPXAUTOFRAME
        fi
-       if [ ! -z "$IPXINTERNALNETNUM" -a "$IPXINTERNALNETNUM" != "0" ]; then
+       if [ -n "$IPXINTERNALNETNUM" -a "$IPXINTERNALNETNUM" != "0" ]; then
                /usr/bin/ipx_internal_net add $IPXINTERNALNETNUM $IPXINTERNALNODENUM
        fi
 fi
@@ -73,8 +87,6 @@ network_postinit()
 # Set static ARP table
 static_arp
 
-# Start rdisc daemon
-rdisc on
 }
 
 ######
@@ -82,67 +94,33 @@ rdisc on
 # - down lo interface.
 network_deinit()
 {
+atm_daemons_stop
+
+setup_forwarding off
 setup_routes off
 
 # Set down NAT rules
 setup_nat off
 
-# Shut down rdisc daemon
-rdisc off
-
-# Spoofing protection && dynamic IP && port range
-ipv4_anti_spoofing off
-ipv4_dynamic_ip_patch off
-ipv4_local_port_range off
-
-# Others proc/sys/net
-proc_networking stop
-
 # Set DOWN loopback interface
 set_down_loopback
 }
 
-proc_networking()
-{
-TODO="$1"
-
-# IPv4 forwarding
-proc_net ipv4/ip_forward $TODO 1 0 IPV4_FORWARDING "IPv4 forwarding"
-# IPv6 forwarding
-if is_yes "$IPV6_NETWORKING"; then
-   proc_net ipv6/conf/all/forwarding $TODO 1 0 IPV6_FORWARDING "IPv6 forwarding"
-fi
-# Others proc/net
-proc_net ipv4/conf/all/accept_redirects $TODO 1 0 IPV4_ACCEPT_ICMP_REDIR ""
-proc_net ipv4/conf/all/accept_source_route $TODO 1 1 IPV4_ACCEPT_SOURCE_ROUTE ""
-proc_net ipv4/conf/all/log_martians $TODO 1 0 IPV4_LOG_MARTIANS ""
-proc_net ipv4/conf/all/mc_forwarding $TODO 1 0 IPV4_MULTICAST ""
-proc_net ipv4/conf/all/proxy_arp $TODO 1 0 IPV4_PROXY_ARP ""
-proc_net ipv4/conf/all/secure_redirects $TODO 1 1 IPV4_ACCEPT_ICMP_REDIR_GATE ""
-proc_net ipv4/conf/all/send_redirects $TODO 1 1 IPV4_SEND_ICMP_REDIR ""
-proc_net ipv4/icmp_echo_ignore_all $TODO 1 0 IPV4_IGN_ALL_ICMP ""
-proc_net ipv4/icmp_echo_ignore_broadcasts $TODO 1 1 IPV4_IGN_CAST_ICMP ""
-proc_net ipv4/ip_no_pmtu_disc $TODO 1 0 IPV4_MTU_DISCOVERY ""
-proc_net ipv4/ip_masq_debug $TODO 1 0 IPV4_MASQ_DEBUGGING ""
-proc_net ipv4/tcp_retrans_collapse $TODO 0 1 IPV4_RETRANS_COLLAPSE ""
-proc_net ipv4/tcp_sack $TODO 0 1 IPV4_NO_SELECT_ACK ""
-proc_net ipv4/tcp_timestamps $TODO 0 1 IPV4_NO_TIMESTAMPS ""
-proc_net ipv4/tcp_stdurg $TODO 1 0 IPV4_RFC793 ""
-proc_net ipv4/tcp_syncookies $TODO 1 0 IPV4_SYN_COOKIES ""
-proc_net ipv4/tcp_window_scaling $TODO 1 0 IPV4_NO_WINDOW_SCALING ""
-}
-
 # find all the interfaces besides loopback.
 # ignore aliases, alternative configurations, and editor backup files
-interfaces="`(cd /etc/sysconfig/interfaces && ls ifcfg* | \
-egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | sed 's/^ifcfg-//g' | xargs) 2> /dev/null`"
-interfaces_boot="`(cd /etc/sysconfig/interfaces && ls ifcfg* | \
-egrep -v '(ifcfg-lo|ifcfg-sit|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
-xargs egrep -l "ONBOOT=[^n][^o]" | sed 's/^ifcfg-//g') 2> /dev/null`"
-interfaces_sit_boot="`(cd /etc/sysconfig/interfaces && ls ifcfg-sit* | \
-egrep 'ifcfg-[a-z0-9]+$' | xargs egrep -l "ONBOOT=[^n][^o]" | sed 's/^ifcfg-//g') 2> /dev/null`"
-tunnels="`(cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
-xargs egrep -l "ONBOOT=[^n][^o]" | sed 's/^tnlcfg-//g') 2> /dev/null`"
+interfaces=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+       egrep -v '(ifcfg-lo|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
+       awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+interfaces_boot=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg* | \
+       egrep -v '(ifcfg-lo|ifcfg-sit|:)' | egrep 'ifcfg-[a-z0-9]+$' | \
+       xargs egrep -l "ONBOOT=[^n][^o]" | \
+       awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+interfaces_sit_boot=$((cd /etc/sysconfig/interfaces && ls -1 ifcfg-sit* | \
+       egrep 'ifcfg-[a-z0-9]+$' | xargs egrep -l "ONBOOT=[^n][^o]" | \
+       awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
+tunnels=$((cd /etc/sysconfig/interfaces && ls -1 tnlcfg-* | \
+       xargs egrep -l "ONBOOT=[^n][^o]" | \
+       awk ' { gsub(/ifcfg-/,NIL); print $0 } ') 2> /dev/null)
 
 # See how we were called.
 case "$1" in
@@ -150,16 +128,16 @@ case "$1" in
        network_init
 
        for i in $interfaces_boot $interfaces_sit_boot ; do
-               /sbin/ifup $i boot
+               run_cmd -a "$(nls "Bringing up interface") $i" /sbin/ifup $i boot
        done
 
-       for i in `find_ldap_interfaces` ; do
-               /sbin/ifup $i boot
+       for i in $(find_ldap_interfaces) ; do
+               run_cmd -a "$(nls "Bringing up interface from LDAP") $i" /sbin/ifup $i boot
        done
 
        for i in $tunnels; do
-               /sbin/tnlup $i boot
-               /sbin/ifup tnlcfg-$i boot
+               run_cmd -a "$(nls "Setting tunnel") $i" /sbin/tnlup $i boot
+               run_cmd -a "$(nls "Bringing up tunnel interface") $i" /sbin/ifup tnlcfg-$i boot
        done
        
        network_postinit
@@ -167,17 +145,42 @@ case "$1" in
         touch /var/lock/subsys/network
         ;;
   stop)
+       # If we go to runlevel 0, 1 or 6 then umount all network fs
+       if [ "$RUNLEVEL" = "6" -o "$RUNLEVEL" = "0" -o "$RUNLEVEL" = "1" ]; then
+               if [ -x /etc/rc.d/init.d/netfs -a -f /var/lock/subsys/netfs ];
+               then
+                       /etc/rc.d/init.d/netfs stop
+               else
+                       netmtab=$(awk '{ if ($3 ~ /^(nfs|smbfs|ncpfs)$/ ) print $3}' /proc/mounts)
+                       if (echo "$netmtab" | grep -q nfs); then
+                          run_cmd "Unmounting NFS filesystems" umount -fat nfs
+                       fi
+                       if (echo "$netmtab" | grep -q smbfs); then
+                          run_cmd "Unmounting SMB filesystems" umount -at smbfs
+                       fi
+                       if (echo "$netmtab" | grep -q ncpfs); then
+                          run_cmd "Unmounting NCP filesystems" umount -at ncpfs
+                       fi
+               fi
+       fi
+
        for i in $tunnels; do
-               /sbin/ifdown tnlcfg-$i boot
-               /sbin/tnldown $i boot
+               run_cmd -a "$(nls "Shutting down tunnel interface") $i" /sbin/ifdown tnlcfg-$i boot
+               run_cmd -a "$(nls "Removing tunnel") $i" /sbin/tnldown $i boot
        done
 
-       for i in `find_ldap_interfaces` ; do
-               /sbin/ifdown $i boot
+       for i in $(find_ldap_interfaces) ; do
+               run_cmd -a "$(nls "Shutting down interface from LDAP") $i" /sbin/ifdown $i boot
        done
 
        for i in $interfaces_sit_boot $interfaces_boot ; do
-               /sbin/ifdown $i boot
+               run_cmd -a "$(nls "Shutting down interface") $i" /sbin/ifdown $i boot
+       done
+
+       for i in $(ip link show | awk -F":" ' (/UP/) && ($2 !~ "lo") { print $2; } ') ; do
+               show "Shutting down unconfigured interface %s" "$i"
+               ip addr flush dev $i | grep -v "Nothing to flush"
+               if (ip link set $i down); then ok; else fail; fi
        done
 
        network_deinit
@@ -189,9 +192,11 @@ case "$1" in
        echo "lo $interfaces"
        nls "Configured tunnels:"
        echo "$tunnels"
-
+       echo
+       nls "Currently inactive devices and tunnels:"
+       /sbin/ip link show | awk -F":" '(/^[0-90-90-9]:/) && ! (/UP/) { print $2 }' | xargs
        nls "Currently active devices and tunnels:"
-       /sbin/ip link show | egrep '^[^ ].*' |sed 's/[0-9]*: \(.*\):.*/\1/'|xargs
+       /sbin/ip link show | awk -F":" ' (/UP/) { print $2 }' | xargs
        ;;
   restart)
        $0 stop
@@ -203,3 +208,7 @@ case "$1" in
 esac
 
 exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 81af963c8c9dce718c9d2bad67f4e67c4272d7aa..518e210d4f39b3032f260f4472d0572abefdf4f0 100644 (file)
@@ -7,7 +7,7 @@
 # description: Saves and restores system entropy pool for higher quality \
 #              random number generation.
 #
-# $Id: random,v 1.5 1999/12/02 10:38:55 kloczek Exp $
+# $Id: random,v 1.5.2.1 2000/10/18 20:10:50 misiek Exp $
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -68,3 +68,7 @@ case "$1" in
 esac
 
 exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 2028473731e6901c3c3674ac48e0464cf33d5bd6..c4f30d7d9cb94650d2ed0a32b48a2ef8c58ade02 100644 (file)
@@ -9,10 +9,10 @@
 #              Note that the file systems are kept mounted. \
 #
 # Author:      Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
-#              Modified for PLD Linux by Grzegorz Stanislawski
-# Changes:     Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+# Changes:     Grzegorz Stanislawski <stangrze@open.net.pl>
+#              Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 # 
-# $Id: single,v 1.9 2000/02/03 11:50:20 misiek Exp $
+# $Id: single,v 1.9.2.1 2000/10/18 20:10:50 misiek Exp $
 
 # Set the path.
 PATH=/sbin:/bin:/usr/sbin:/usr/bin
@@ -41,7 +41,7 @@ case "$1" in
 
 # make sure modprobe is working
 if [ -f /proc/sys/kernel/modprobe ]; then
-       echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
+       sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
 fi
 
 # If they want to run something in single user mode, might as well run it...
@@ -62,3 +62,7 @@ done
        exec init -t1 S
        ;;
 esac
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index dfe6bb5378aa64c3577ffaf1578919a467800c8a..04a943e9a82ec2cf268ee2131feabc0528b9def0 100644 (file)
@@ -5,6 +5,8 @@
 # chkconfig:    345  <startr_level> <stop_level>
 #
 # description: <service> long service description
+#
+# $Id: template.init,v 1.3.2.1 2000/10/18 20:10:50 misiek Exp $
 
 
 # Source function library
@@ -23,10 +25,14 @@ OPTION4=5   #
 [ -f /etc/sysconfig/<service> ] && . /etc/sysconfig/<service>
 
 # Check that networking is up.
-if is_no "${NETWORKING}"; then
-       # nls "ERROR: Networking is down. %s can't be run." <service>
-       msg_Network_Down <service>
-       exit 1
+if is_yes "${NETWORKING}"; then
+       if [ ! -f /var/lock/subsys/network ]; then
+               # nls "ERROR: Networking is down. %s can't be run." <service>
+               msg_network_down <service>
+               exit 1
+       fi
+else
+       exit 0
 fi
 
 
@@ -42,7 +48,7 @@ case "$1" in
                [ $RETVAL -eq 0 ] && touch /var/lock/subsys/<service>
        else
                # show "%s service is already running." <service>
-               msg_Already_Running <service>
+               msg_already_running <service>
                exit 1
        fi
         ;;
@@ -52,10 +58,11 @@ case "$1" in
        if [ -f /var/lock/subsys/<service> ]; then
                msg_stopping <service>
                killproc <service>
-               rm -f /var/lock/subsys/<service> >/dev/null 2>&1
+               RETVAL=$?
+               rm -f /var/lock/subsys/<service>
        else
                # show "%s service is not running." <service>
-               msg_Not_Running <service>
+               msg_not_running <service>
                exit 1
        fi      
         ;;
@@ -68,29 +75,32 @@ case "$1" in
                # show "Reload %s service" <service>
                msg_reloading <service>
                killproc <service> -HUP
+               RETVAL=$?
        else
                # show "%s service is not running." <service>
-               msg_Not_Running <service>
-               exit 1
+               msg_not_running <service>
+               RETVAL=1
        fi
        ;;
   force-reload)
        # if program allows reloading without stopping
        $0 reload
-       exit $?
 
        # or if it doesn't
        $0 stop && $0 start
-       exit $?
        ;;
   status)
        status <service>
-       exit $?
+       RETVAL=$?
         ;;
   *)
         # show "Usage: %s {start|stop|status|restart|reload|force-reload}" $0
-       msg_Usage "$0 {start|stop|status|restart|reload|force-reload}"
+       msg_usage "$0 {start|stop|status|restart|reload|force-reload}"
         exit 1
 esac
 
 exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index b64d19d526089a6fae4e2c1c175f5ed823331e1c..59d2ca676cf4dc7810bcaa1369bce8cda34436ca 100644 (file)
@@ -5,7 +5,7 @@
 # description: This script is setting time zone information for your machine.
 # Author:      Pawel Wilk <siefca@pld.org.pl>
 #
-# $Id: timezone,v 1.5 2000/05/13 07:11:55 wiget Exp $
+# $Id: timezone,v 1.5.2.1 2000/10/18 20:10:50 misiek Exp $
 
 # NLS
 NLS_DOMAIN="rc-scripts"
@@ -18,11 +18,11 @@ NLS_DOMAIN="rc-scripts"
 
 ZONE_FILE="$ZONE_INFO_DIR"
 
-if [ "$ZONE_INFO_SCHEME" != "" ]; then
+if [ -n "$ZONE_INFO_SCHEME" ]; then
     ZONE_FILE="$ZONE_FILE/$ZONE_INFO_SCHEME"
 fi
 
-if [ "$ZONE_INFO_AREA" != "" ]; then
+if [ -n "$ZONE_INFO_AREA" ]; then
     ZONE_FILE="$ZONE_FILE/$ZONE_INFO_AREA"
 fi
 
@@ -35,17 +35,18 @@ case "$1" in
   start)
         rm -f /etc/localtime
        if [ -f "$ZONE_FILE" ]; then
-               if [ "$ZONE_INFO_AREA" != "" ]; then
+               if [ -n "$ZONE_INFO_AREA" ]; then
                    MESSAGS="`nls "Setting time zone information (%s, %s)" "$ZONE_INFO_AREA" "$TIME_ZONE"`"
-                   run_cmd "$MESSAGE" ln -s $ZONE_FILE /etc/localtime
                else
                    MESSAGE="`nls "Setting time zone information (%s)" "$TIME_ZONE"`"
-                   run_cmd "$MESSAGE" ln -s $ZONE_FILE /etc/localtime
                fi
+               run_cmd "$MESSAGE" ln -s $ZONE_FILE /etc/localtime
+               RETVAL=$?
        fi
         ;;
   stop)
            run_cmd "Unsetting time zone information" rm -f /etc/localtime
+           RETVAL=$?
         ;;
   restart)
           $0 stop
@@ -61,4 +62,8 @@ esac
 
 unset ZONE_FILE ZONE_INFO_DIR ZONE_INFO_SCHEME ZONE_INFO_AREA TIME_ZONE MESSAGE
 
-exit 0
+exit $RETVAL
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/rc.d/rc b/rc.d/rc
index 4fccb2016e4a3c3ef9bc6859df471352cba35473..9859fbec40fdec923a55624f156fb3b9b82c6fcd 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -5,13 +5,26 @@
 #               responsible for the very first setup of basic
 #               things, such as setting the hostname.
 #
-# $Id: rc,v 1.25 2000/05/31 18:01:39 zagrodzki Exp $
+# $Id: rc,v 1.25.2.1 2000/10/18 20:10:48 misiek Exp $
 #
 # Original Author:       
 #               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
 # Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
+# avoid being interrupted by child or keyboard
+trap ":" INT QUIT TSTP
+
+# Save argument
+argv1="$1"
+
+# Get terminal size of standard input of the system console
+[ -z "$CONSOLE" ] && CONSOLE=/dev/console
+set -- $(stty size < $CONSOLE)
+  LINES=$1
+COLUMNS=$2
+export LINES COLUMNS CONSOLE
+  
 # NLS
 if [ -f /etc/sysconfig/i18n ]; then
         . /etc/sysconfig/i18n
@@ -46,21 +59,27 @@ else
 fi
 
 # Now find out what the current and what the previous runlevel are.
-argv1="$1"
-set `/sbin/runlevel`
+set $(/sbin/runlevel)
 runlevel=$2
 previous=$1
 export runlevel previous
 
+# if previous runlevel = current runlevel do nothing
+[ "$runlevel" = "$previous" ] && exit 0
+
 # if runlevel is 0 (halt) or 6 (reboot) change to first
 # virtual console, and send messages to /dev/console 
 # (it can be serial console too) 
-if [ "$runlevel" = "0" ] || [ "$runlevel" = "6" ]; then
-       [ -x /usr/bin/chvt ] && /usr/bin/chvt 1 && echo > /dev/console
-       exec 0<> /dev/console 1>&0 2>&0
+if [ "$COLUMNS" -gt 0 ]; then
+       if [ "$runlevel" = "0" -o "$runlevel" = "6" ]; then
+               CONSOLE=/dev/tty1
+               [ -x /usr/bin/chvt ] && /usr/bin/chvt 1 && echo > $CONSOLE
+               exec 0<> /dev/console 1>&0 2>&0
+       fi
 else
-# if previous runlevel = current runlevel do nothing
-       [ "$runlevel" = "$previous" ] && exit 0
+       # Serial: columns and lines are not defined
+         LINES=24
+       COLUMNS=80
 fi
 
 # See if we want to be in user confirmation mode
@@ -80,19 +99,19 @@ fi
 stty onlcr -ixon 0>&1
 
 # Get first argument. Set new runlevel to this argument.
-[ "$1" != "" ] && runlevel="$argv1"
+[ -n "$1" ] && runlevel="$argv1"
 
 # Tell linuxconf what runlevel we are in
 [ -d /var/run -a -w /var/run ] && echo "/etc/rc.d/rc$runlevel.d" > /var/run/runlevel.dir
 
 
 # Say something ;)
-af2="`termput setaf 2`"
-af6="`termput setaf 6`"
-af7="`termput setaf 7`"
-text="`nls "%sResource Manager: %sEntering runlevel number" "$af2" "$af7"`"
-text_size="`nls "%sResource Manager: %sEntering runlevel number" "" ""`"
-resp_size="`nls "DONE"`"
+af2=$(termput setaf 2)
+af6=$(termput setaf 6)
+af7=$(termput setaf 7)
+text="$(termput op)$(nls "%sResource Manager: %sEntering runlevel number" "$af2" "$af7")"
+text_size="$(nls "%sResource Manager: %sEntering runlevel number" "" "")"
+resp_size="$(nls "DONE")"
 echo -n "$text"
 awk "BEGIN { for (j=length(\"$text_size\"); j<$INIT_COL+${#resp_size}-${#runlevel}; j++) printf \".\" }"
 echo "${af6}[${af2} $runlevel ${af6}]${af7}"
@@ -176,10 +195,15 @@ else
 fi
 
 # Say something ;)
-text="`nls "%sResource Manager: %sRunlevel has been reached" "$af2" "$af7"`"
-text_size="`nls "%sResource Manager: %sRunlevel has been reached" "" ""`"
+text="$(nls "%sResource Manager: %sRunlevel has been reached" "$af2" "$af7")"
+text_size="$(nls "%sResource Manager: %sRunlevel has been reached" "" "")"
 echo -n "$text"
 awk "BEGIN { for (j=length(\"$text_size\"); j<$INIT_COL+${#resp_size}-${#runlevel}; j++) printf \".\" }"
 echo "${af6}[${af2} $runlevel ${af6}]${af7}"
 unset af2 af6 af7
 
+exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index b03c3306b7852050c0b1699e2ffdb2c50efc1d46..f9fff9ab12afee5c7e9973a9e748c9ca7b13a887 100755 (executable)
@@ -1,21 +1,24 @@
-# $Id: rc.init,v 1.3 1999/09/02 12:42:44 misiek Exp $
+# $Id: rc.init,v 1.3.2.1 2000/10/18 20:10:49 misiek Exp $
 # This script is started by init ...
 
 if [ -r /etc/sysconfig/i18n ]; then
 . /etc/sysconfig/i18n
 fi
 
-if [ -n "$LANG" ]; then
-export LANG
-fi
-
-if [ -n "$LC_ALL" ]; then
-export LC_ALL
-fi
-
-if [ -n "$LINGUAS" ]; then
-export LINGUAS
-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
 
 # Execute the program.
 eval exec "$4"
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index b3619dc845e585d69d1a93f3a9b4450fa13f429a..06182b79fc0f496939f006e8442aacd584adfc9b 100755 (executable)
@@ -1,8 +1,11 @@
 #!/bin/sh
 #
-# $Id: rc.local,v 1.3 1999/07/13 12:49:35 misiek Exp $
+# $Id: rc.local,v 1.3.2.1 2000/10/18 20:10:49 misiek Exp $
 #
 # This script will be executed *after* all the other init scripts.
 # You can put your own initialization stuff in here if you don't
 # want to do the full Sys V style init stuff.
 
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/rc.d/rc.modules b/rc.d/rc.modules
new file mode 100755 (executable)
index 0000000..ddc2504
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+# (c) MandrakeSoft, Chmouel Boudjnah <chmouel@mandrakesoft.com>
+# Modified:
+#      Arkadiusz Miskiewicz <misiek@pld.org.pl>
+#
+# rc.modules: launch modules specified in /etc/modules
+# $Id: rc.modules,v 1.1.2.1 2000/10/18 20:10:49 misiek Exp $
+
+[ -f /etc/modules ] || exit 0
+
+. /etc/rc.d/init.d/functions
+
+# Loop over every line in /etc/modules.
+(egrep -v "^(#|[[:blank:]]*#)" /etc/modules; echo) | # make sure there is a LF at the end
+while read module args
+do
+  [ -z "$module" ] && continue
+  _modprobe single -k $module
+done
+
index 4478ac28bc43dc0d924bd2bc5ab681709326bc47..82aa18fac4d5c985b85587e37c953c74db2fce92 100755 (executable)
@@ -3,10 +3,10 @@
 # shutdwn       Common script for system halt/reboot.
 #
 # Author:       Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
-#               Modified for PLD Linux by Grzegorz Stanislawski
-# Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+# Changes:     Grzegorz Stanislawski <stangrze@open.net.pl>
+#              Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
-# $Id: rc.shutdown,v 1.12 2000/06/25 14:40:36 waszi Exp $
+# $Id: rc.shutdown,v 1.12.2.1 2000/10/18 20:10:49 misiek Exp $
 
 # Set the path.
 PATH=/sbin:/bin:/usr/bin:/usr/sbin
@@ -31,7 +31,7 @@ halt -w
 
 # Turn off swap, then unmount file systems.
 run_cmd "Turning off swap and accounting" swapoff -a
-[ -x /sbin/accton ] && /sbin/accton
+[ -x /sbin/accton ] && LC_ALL=C /sbin/accton 2>&1 | grep -v "not implemented"
 
 if [ -x /sbin/quotaoff ]; then
        run_cmd "Turning off quotas for local filesystems" /sbin/quotaoff -a
@@ -41,11 +41,11 @@ fi
 sig=-15
 retry=3
 force=
-remaining=`awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
+remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
 while [ -n "$remaining" -a "$retry" -gt 0 ]
 do     
        show "Unmounting file systems" ; busy
-       if ERRORS=`LC_ALL=C exec umount -a $FORCE -t noproc 2>&1` ; then
+       if ERRORS=$(LC_ALL=C exec umount -a $FORCE -t noproc 2>&1) ; then
                ok
        else
                fail
@@ -53,7 +53,7 @@ do
        fi
        
        sleep 2
-       remaining=`awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts`
+       remaining=$(awk '!/(^#| proc | loopfs | devfs | devpts | shm |^none|^\/dev\/root| \/ )/ {print $2}' /proc/mounts)
        [ -z "$remaining" ] && break
        /sbin/fuser -k -m $sig $remaining > /dev/null
        sleep 5
@@ -72,7 +72,7 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
        if [ -f /proc/mdstat ] ; then
                mddevs=$(awk '/^md.* active/ {print $1}' /proc/mdstat)
                for mddev in $mddevs ; do
-                       MESSAGE="`nls "Turning off RAID for %s" "$mddev"`"
+                       MESSAGE="$(nls "Turning off RAID for %s" "$mddev")"
                        run_cmd "$MESSAGE" raidstop /dev/$mddev
                done
                unset mddev mddevs
@@ -81,10 +81,14 @@ if [ -x /sbin/raidstop -a -f /etc/raidtab ]; then
 fi
 
 show "Remounting remaining filesystems ro mode"; busy
-if ( mount | awk '/ext2/ { print $3 }' | \
+if ( mount | awk '/ext2|ext3|reiserfs/ { print $3 }' | \
        while read line; do 
        mount -n -o ro,remount $line; done ); then
        ok
 else
        fail
 fi
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 000bd3c2252f4bc22dacb8b71f256958b213724f..cef77f96443fa078d6385f63cccdf4db7a068e1a 100755 (executable)
@@ -1,18 +1,23 @@
 #!/bin/sh
 #
 # /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.69 2000/07/13 15:29:51 baggins Exp $
+# $Id: rc.sysinit,v 1.69.2.1 2000/10/18 20:10:49 misiek Exp $
 #
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
 # Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
 
+# Rerun ourselves through initlog
+if [ -z "$IN_INITLOG" ]; then
+       [ -f /sbin/initlog ] && exec /sbin/initlog -r /etc/rc.d/rc.sysinit
+fi
 # Set the path
 PATH=/bin:/sbin:/usr/bin:/usr/sbin
 export PATH
 
 # NLS
-if [ -f /etc/sysconfig/i18n ]; then
+if [ -r /etc/sysconfig/i18n ]; then
        . /etc/sysconfig/i18n
        [ -n "$LANG" ] && export LANG || unset LANG
        [ -n "$LC_CTYPE" ] && export LC_CTYPE || unset LC_CTYPE
@@ -30,7 +35,7 @@ fi
 . /etc/rc.d/init.d/functions
 
 # Read network config data.
-if [ -f /etc/sysconfig/network ]; then
+if [ -r /etc/sysconfig/network ]; then
        . /etc/sysconfig/network
 else
        NETWORKING=no
@@ -38,7 +43,7 @@ else
 fi
 
 # Read system config data.
-if [ -f /etc/sysconfig/system ]; then
+if [ -r /etc/sysconfig/system ]; then
        . /etc/sysconfig/system
 else
        RUN_SULOGIN_ON_ERR=yes
@@ -53,15 +58,15 @@ else
 fi
 
 # Print welcome message
-echo -e "\t\t\t`termput setaf 6`Powered by `termput setaf 2`PLD GNU/Linux`termput setaf 7`"
+nls "\t\t\t%sPowered by %sPLD GNU/Linux%s" "$(termput setaf 6)" "$(termput setaf 2)" "$(termput setaf 7)"
 if is_yes "$PROMPT"; then
-       echo -en "\t\t`nls "Press"` '`termput setaf 1`I`termput setaf 7`' `nls "to enter interactive startup."`"
+       nls -n "\t\t     Press %sI%s to enter interactive startup." "$(termput setaf 1)" "$(termput setaf 7)"
        echo
        sleep 1
 fi
 
 # we need /proc mounted before everything
-mount -n -t proc /proc /proc
+mount -n -o gid=17 -t proc /proc /proc
 
 # /dev must be also mounted before everything but only if we want use them ;-)
 if is_yes "$MOUNT_DEVFS"; then
@@ -69,26 +74,24 @@ if is_yes "$MOUNT_DEVFS"; then
 fi
 
 # set up devfsd
-if is_yes "$RUN_DEVFSD"; then
-    if [ -x /sbin/devfsd -a -f /etc/devfsd.conf ]; then
-           run_cmd "Starting Device Filesystem Daemon" /sbin/devfsd /dev
-    fi
+if [ -c /dev/.devfsd -a -x /sbin/devfsd ]; then
+       run_cmd "Starting Device Filesystem Daemon" /sbin/devfsd /dev
+       if [ -e /dev/cdroms/cdrom0 ]; then
+               ln -sf /dev/cdroms/cdrom0 /dev/cdrom
+       fi
+       if [ -f /etc/sysconfig/mouse ]; then
+               . /etc/sysconfig/mouse
+               if [ -n "$DEVICE" -a "$DEVICE" != "/dev/mouse" ]; then
+                       ln -s $DEVICE /dev/mouse
+               fi
+       fi
 fi
 
 # Set console loglevel
 /bin/dmesg -n $CONSOLE_LOGLEVEL
 
-# Turn off sysrq
-if [ -f /proc/sys/kernel/sysrq ] && is_no "$MAGIC_SYSRQ"; then
-        echo "0" > /proc/sys/kernel/sysrq
-       run_cmd "Turning off Magic SysRq key" /bin/true
-fi
-
-# Turn off Stop-A
-if [ -f /proc/sys/kernel/stop-a ] && is_no "$STOP_A"; then
-       echo "0" > /proc/sys/kernel/stop-a
-       run_cmd "Turning off Stop-A/Break-A" /bin/true
-fi
+# Configure Linux kernel
+run_cmd "Configuring kernel parameters" /sbin/sysctl -p /etc/sysctl.conf
 
 # Set the system clock.
 ARC=0
@@ -135,31 +138,33 @@ esac
 
 # Check if timezone definition is available
 if [ -e /etc/localtime ] ; then
-       if run_cmd "Setting clock$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
-               show "Today's date: `LC_CTYPE=C date`"; ok
+       if run_cmd "$(nls "Setting clock")$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
+               show "$(nls "Today's date:") $(LC_CTYPE=C date)"; ok
        fi
 else
        TIME_SETUP_DELAYED=yes
 fi
 
 # Start up swapping.
-run_cmd "`nls "Activating swap partitions"`" swapon -a
+run_cmd "Activating swap partitions" swapon -a
 
 # Set the hostname.
-run_cmd "`nls "Host:"` ${HOSTNAME}" hostname ${HOSTNAME}
+run_cmd "$(nls "Host:") ${HOSTNAME}" hostname ${HOSTNAME}
 
 # Set the NIS domain name
 if [ -n "$NISDOMAIN" ]; then
-       run_cmd "`nls "NIS Domain:"` ${NISDOMAIN}" domainname $NISDOMAIN
+       run_cmd "$(nls "NIS Domain:") ${NISDOMAIN}" domainname $NISDOMAIN
 else
        domainname ""
 fi
 
-# Setup hdparm thingy (if exists)
-[ -x /etc/rc.d/rc.hdparm ] && /etc/rc.d/rc.hdparm
+# Setup hdparm thing (if exists and is needed)
+if ! grep -iq nohdparm /proc/cmdline; then
+       [ -x /etc/rc.d/rc.hdparm ] && /etc/rc.d/rc.hdparm
+fi
 
 if [ -f /fsckoptions ]; then
-       fsckoptions=`cat /fsckoptions`
+       fsckoptions=$(cat /fsckoptions)
 else
        fsckoptions=''
 fi
@@ -168,12 +173,18 @@ if [ -f /forcefsck ]; then
         fsckoptions="-f $fsckoptions"
 fi
 
+if is_yes "$COLOR_INIT"; then
+       fsckoptions="-C $fsckoptions"
+else
+       fsckoptions="-V $fsckoptions"
+fi
+
 _RUN_QUOTACHECK=0
 if awk '{ if ($2 ~ /^\/$/ && ( $3 ~ /^(nfs|romfs)$/ || $6 ~ /^0$/ ) ) exit 1 ; else exit 0}' /etc/fstab; then
 
     if [ ! -f /fastboot  ]; then
            show "Checking root filesystems."; started
-           initlog -c "fsck -C -T -a $fsckoptions /"
+           initlog -c "fsck -T -a $fsckoptions /"
 
            rc=$?
 
@@ -186,7 +197,7 @@ if awk '{ if ($2 ~ /^\/$/ && ( $3 ~ /^(nfs|romfs)$/ || $6 ~ /^0$/ ) ) exit 1 ; e
                    nls "*** when you leave the shell."
                    echo
 
-                   PS1="`nls "(Repair filesystem)# "`"; export PS1
+                   PS1="$(nls "(Repair filesystem)# ")"; export PS1
                    if is_yes "$RUN_SULOGIN_ON_ERR"; then
                            sulogin
                    else
@@ -204,7 +215,7 @@ if awk '{ if ($2 ~ /^\/$/ && ( $3 ~ /^(nfs|romfs)$/ || $6 ~ /^0$/ ) ) exit 1 ; e
 fi
 
 # check for arguments 
-if grep -i nopnp /proc/cmdline >/dev/null ; then
+if grep -iq nopnp /proc/cmdline; then
        PNP=
 else
        PNP=yes
@@ -239,6 +250,12 @@ if is_yes "$DELAY_LOGIN" && [ ! -f /etc/nologin ]; then
        ok
 fi
 
+# The root filesystem is now read-write, so we can now log via
+# syslog() directly..
+if [ -n "$IN_INITLOG" ]; then
+    IN_INITLOG=""
+fi
+    
 echo ${HOSTNAME} > /etc/HOSTNAME
 
 # Clear mtab
@@ -250,7 +267,7 @@ mount -f /proc
 
 if [ ! -f /proc/modules ]; then
        USEMODULES=
-elif ! grep -i nomodules /proc/cmdline >/dev/null ; then
+elif ! grep -iq nomodules /proc/cmdline; then
        USEMODULES=y
 else
        USEMODULES=
@@ -260,43 +277,57 @@ fi
 rm -f /lib/modules/preferred
 rm -f /lib/modules/default
 if [ -x /sbin/depmod -a -n "$USEMODULES" ]; then
-       if is_yes "$SET_SLINKS"; then
-       # Get ready for kmod if module support in the kernel
-               if [ -z `uname -r | grep "-"` ]; then
-               # we're using a new kernel, no preferred needed
-                       mver=`uname -r`
-               else
-                       ktag="`cat /proc/version`"
-                       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,[       ].*$,,'
-                       fi
-                       if [ -n "$mver" ]; then
-                               ln -sf /lib/modules/$mver /lib/modules/default
-                       fi
-               fi
+  if is_yes "$SET_SLINKS"; then
+    # Get ready for kmod if module support in the kernel
+    if [ -z $(uname -r | grep "-") ]; then
+       # we're using a new kernel, no preferred needed
+       mver=$(uname -r)
+    else
+       ktag="$(cat /proc/version)"
+       mtag=grep -l "$ktag" /lib/modules/*/.rhkmvtag 2> /dev/null
+       if [ -n "$mtag" ]; then
+           mver=$(echo $mtag | awk ' { gsub(/\/lib\/modules\//,NIL); gsub(/.rhkmvtag/,NIL); gsub(/[     ].*$/,NIL); print $0 } ')
        fi
-       [ -n "$mver" -a -f "/boot/module-info-$mver" ] && \
-               ln -sf /boot/module-info-$mver /boot/module-info
-       [ -n "$mver" -a -f "/boot/System.map-$mver" ] && \
-               ln -sf /boot/System.map-$mver /boot/System.map
-
-       # Run depmod if:
-       # a) user requested or RUN_DEPMOD="";
-       # b) modules.dep is missing
-       # c) modules.dep is older than /etc/modules.conf or /lib/modules/$mver
-       if ! is_no "$RUN_DEPMOD" || [ -z "$RUN_DEPMOD" ]; then
-               if [ "$RUN_DEPMOD" = "ifmissing" -a ! -r /lib/modules/$mver/modules.dep ] ||\
-               is_yes "$RUN_DEPMOD" || [ -z "$RUN_DEPMOD" ] ||\
-               [ /lib/modules/$mver/modules.dep -ot /etc/modules.conf ] ||\
-               [ /lib/modules/$mver/modules.dep -ot /lib/modules/$mver ]
-               then
-                       run_cmd "Finding module dependencies" depmod -a
-               fi
+       if [ -n "$mver" ]; then
+           ln -sf /lib/modules/$mver /lib/modules/default
+       fi
+    fi
+    
+    [ -n "$mver" -a -f "/boot/module-info-$mver" ] && \
+       ln -sf /boot/module-info-$mver /boot/module-info
+    [ -n "$mver" -a -f "/boot/System.map-$mver" ] && \
+       ln -sf /boot/System.map-$mver /boot/System.map
+  fi
+fi
+
+# Run depmod if RUN_DEPMOD != "no" and:
+# a) user requested or RUN_DEPMOD="";
+# b) modules.dep is missing
+# c) modules.dep is older than /etc/modules.conf or /lib/modules/$mver
+if ! is_no "$RUN_DEPMOD" && [ -n "$USEMODULES" ]; then
+  if is_yes "$RUN_DEPMOD" || [ -z "$RUN_DEPMOD" ] || \
+     [ "$RUN_DEPMOD" = "ifmissing" -a ! -r /lib/modules/$mver/modules.dep ] ||\
+     [ /lib/modules/$mver/modules.dep -ot /etc/modules.conf ] ||\
+     [ /lib/modules/$mver/modules.dep -ot /lib/modules/$mver ]; then
+       run_cmd "Finding module dependencies" depmod -a
+  fi
+fi
+
+if [ -f /proc/sys/kernel/modprobe ]; then
+       if [ -n "$USEMODULES" ]; then
+               sysctl -w kernel.modprobe="/sbin/modprobe" >/dev/null 2>&1
+       else
+               # We used to set this to NULL, but that causes
+               # 'failed to exec' messages"
+               sysctl -w kernel.modprobe="/bin/true" >/dev/null 2>&1
        fi
 fi
 
+# Load modules
+if [ -x /etc/rc.d/rc.modules ]; then
+        /etc/rc.d/rc.modules
+fi
+       
 # load sound modules
 if [ -n "$USEMODULES" ] && is_yes "$LOAD_SOUND"; then
        if grep -s -q "^alias sound-slot-0" /etc/modules.conf ; then
@@ -307,29 +338,21 @@ if [ -n "$USEMODULES" ] && is_yes "$LOAD_SOUND"; then
        fi
 fi
 
-if [ -f /proc/sys/kernel/modprobe ]; then
-       # /proc/sys/kernel/modprobe indicates built-in kmod instead
-       echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
-fi
-
-# Load modules
-if [ -f /etc/rc.d/rc.modules ]; then
-       /etc/rc.d/rc.modules
-fi
-
 # Add raid devices
 if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
-       show "Starting up RAID devices."; started
 
        rc=0
        
-       for i in `grep "raiddev" /etc/raidtab | awk '{print $2}'`
+       for i in $(grep "raiddev" /etc/raidtab | awk '{print $2}')
        do
-               RAIDDEV=`basename $i`
-               RAIDSTAT=`grep "^$RAIDDEV : active" /proc/mdstat`
+               RAIDDEV=$(basename $i)
+               RAIDSTAT=$(grep "^$RAIDDEV : active" /proc/mdstat)
+               show "Starting up RAID device %s" $RAIDDEV
+               busy
                if [ -z "$RAIDSTAT" ]; then
                        # Try raidstart first...if that fails then
-                       # fall back to raid0run.
+                       # fall back to raid0run and if that fails, too
+                       # fall back to raidadd, raidrun.
                        RESULT=1
                        if [ -x /sbin/raidstart ]; then
                                /sbin/raidstart $i
@@ -337,7 +360,21 @@ if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
                        fi
                        if [ $RESULT -gt 0 -a -x /sbin/raid0run ]; then
                                /sbin/raid0run $i
+                               RESULT=$?
+                       fi
+                       if [ $RESULT -gt 0 -a -x /sbin/raidadd -a -x /sbin/raidrun ]; then
+                               /sbin/raidadd $i
+                               /sbin/raidrun $i
+                               RESULT=$?
                        fi
+                       if [ $RESULT -gt 0 ]; then
+                               rc=1
+                               fail
+                       else
+                               ok
+                       fi
+               else
+                       ok
                fi
        done
 
@@ -350,7 +387,7 @@ if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
                nls "*** when you leave the shell."
                echo
 
-               PS1="`nls "(RAID Repair)# "`"; export PS1
+               PS1="$(nls "(RAID Repair)# ")"; export PS1
                if is_yes "$RUN_SULOGIN_ON_ERR"; then
                        sulogin
                else
@@ -364,10 +401,24 @@ if [ -f /proc/mdstat -a -f /etc/raidtab ]; then
        show "Starting up RAID devices."; ok
 fi
 
+# Find and activate volume groups
+if [ -s /etc/lvmtab -a -x /sbin/vgscan -a -x /sbin/vgchange ]; then
+       /sbin/vgscan > /dev/null 2>&1
+       RESULT=$?
+       # 3  - no volume group(s) found
+       # 95 - driver/module not in kernel
+       if [ "$RESULT" = "3" -o "$RESULT" = "95" ]; then
+               rm -rf /etc/lvmtab.d /etc/lvmtab
+       else
+               run_cmd "Scanning for LVM volume groups" /sbin/vgscan
+               run_cmd "Activating LVM volume groups" /sbin/vgchange -a y
+       fi
+fi
+
 # Check filesystems
 if [ ! -f /fastboot ]; then
        show "Checking filesystems."; started
-       initlog -c "fsck -C -T -R -A -a $fsckoptions"
+       initlog -c "fsck -T -R -A -a $fsckoptions"
 
        rc=$?
 
@@ -379,7 +430,7 @@ if [ ! -f /fastboot ]; then
                nls "*** when you leave the shell."
                echo
 
-               PS1="`nls "(Repair filesystem)# "`"; export PS1
+               PS1="$(nls "(Repair filesystem)# ")"; export PS1
                if is_yes "$RUN_SULOGIN_ON_ERR"; then
                        sulogin
                else
@@ -401,8 +452,8 @@ run_cmd "Mounting local filesystems." mount -a -t nonfs,smbfs,ncpfs,proc
 
 # Set the clock if timezone definition wasn't available (eg. /usr not mounted)
 if is_yes "$TIME_SETUP_DELAYED"; then
-       if run_cmd "Setting clock$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
-               show "Today's date: `LC_CTYPE=C date`"; ok
+       if run_cmd "$(nls "Setting clock")$CLOCKDEF" /sbin/hwclock $CLOCKFLAGS; then
+               show "$(nls "Today's date:") $(LC_CTYPE=C date)"; ok
        fi
 fi
 
@@ -416,8 +467,8 @@ if [ -f /etc/rc.d/rc.serial ]; then
 fi
 
 if [ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ]; then
-       show "`nls "Setting %s seconds for kernel reboot after panic." "$PANIC_REBOOT_TIME"`"; busy
-       if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then ok; else fail; fi
+       show "Setting %s seconds for kernel reboot after panic." "$PANIC_REBOOT_TIME"; busy
+       if (sysctl -w kernel.panic=$PANIC_REBOOT_TIME 2> /dev/null); then ok; else fail; fi
 fi
 
 # Clean out /etc & /var/{run/*,log/{b,w}tmpx}}.
@@ -481,27 +532,6 @@ fi
 # there could be a new kernel version.  remove old psdevtab database
 rm -f /etc/psdevtab
 
-# If needed increase number of available system files
-# There are two versions of each setting, because file names
-# changed between Linux 2.0 and 2.2
-if [ -n "$VFS_FILE_MAX" ] ; then
-       if [ -f /proc/sys/kernel/file-max -a "$VFS_FILE_MAX" -gt 0 ]; then
-               echo $VFS_FILE_MAX >/proc/sys/kernel/file-max
-       fi
-       if [ -f /proc/sys/fs/file-max -a "$VFS_FILE_MAX" -gt 0 ]; then
-               echo $VFS_FILE_MAX >/proc/sys/fs/file-max
-       fi
-fi
-if [ -n "$VFS_INODE_MAX" ] ; then
-       if [ -f /proc/sys/kernel/inode-max -a "$VFS_INODE_MAX" -gt 0 ]; then
-               echo $VFS_INODE_MAX >/proc/sys/kernel/inode-max
-       fi
-       if [ -f /proc/sys/fs/inode-max -a "$VFS_INODE_MAX" -gt 0 ]; then
-               echo $VFS_INODE_MAX >/proc/sys/fs/inode-max
-       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
@@ -509,9 +539,14 @@ chmod 640 /var/log/dmesg
 
 # 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
-kill -TERM `/sbin/pidof getkey` >/dev/null 2>&1
+kill -TERM $(/sbin/pidof getkey) >/dev/null 2>&1
 } &
 if is_yes "$PROMPT"; then
    /sbin/getkey i && touch /var/run/confirm
 fi
 wait
+echo
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 9453f86c38287626d6e83b46437b4ecd2ac0143a..3f425cb22ea7ed59159273faf5811b06dc9a8889 100755 (executable)
--- a/run-parts
+++ b/run-parts
@@ -1,6 +1,6 @@
 #!/bin/sh
-
 # run-parts - concept taken from Debian
+# $Id: run-parts,v 1.1.2.1 2000/10/18 20:10:45 misiek Exp $
 #
 # modified for PLD by Pawel Wilk <siefca@pld.org.pl>
 # be ware: run-parts is now able to get arguments!
index 8151a8026dcb95ac2e868338fcd0ff2730d5b063..3050b4001734091b78912cb4638065ca44a46f1b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: setsysfont,v 1.5 1999/08/02 13:04:45 kloczek Exp $
+#      $Id: setsysfont,v 1.5.2.1 2000/10/18 20:10:45 misiek Exp $
 #
 
 [ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
@@ -10,13 +10,10 @@ if [ -x /usr/bin/consolechars -o -x /bin/consolechars ]; then
        if [ -n "$SYSFONT" ]; then
                consolechars -f $SYSFONT
        elif [ -n "$CONSOLEFONT" ]; then
-               consolechars -f $CONSOLEFONT
+               consolechars -m ${CONSOLEMAP:-trivial.trans} -f $CONSOLEFONT
        fi
-       if [ "$CONSOLEMAP" != "" ]; then
-               consolechars -m $CONSOLEMAP
-       fi
-       if [ "$KEYTABLE" != "" ]; then
-               loadkeys $KEYTABLE
+       if [ -n "$KEYTABLE" ]; then
+               loadkeys $KEYTABLE < /dev/tty0 > /dev/tty0
        fi
 
 
index 3a4d34a45486ff89d8b8f6eb1f02bf4bd4369235..333c1d21c81b61e6653b68acfb1311bd2cfe4b6a 100644 (file)
@@ -5,7 +5,10 @@ SUBDIRS = data up.d down.d
 interfacesdir = @sysconfigdir@/interfaces
 
 interfaces_DATA = \
+       ifcfg-atm0 \
+       ifcfg-br0 \
        ifcfg-description \
+       ifcfg-lec0 \
        ifcfg-ppp0.callback \
        ifcfg-ppp0.leased1 \
        ifcfg-ppp0.leased2 \
diff --git a/sysconfig/interfaces/ifcfg-atm0 b/sysconfig/interfaces/ifcfg-atm0
new file mode 100644 (file)
index 0000000..c999fb8
--- /dev/null
@@ -0,0 +1,11 @@
+#
+# /etc/sysconfig/interfaces/ifcfg-atm* - CLIP interfaces
+#
+DEVICE=atm0                    # device name
+IP_1_ADDR=192.168.0.1/24       # hosts's IP address on the ATM LIS
+IP4_PRIM_NR=1
+ARPSRV_ATMADDR=switch-qaa0     # ATM address of ATMARP server; omit if local
+ARPSRV_IPADDR=192.168.0.10     # IP address of ATMARP server
+# ARPSRVQOS="ubr:max_pcr=100kbps"      # QOS of the ATMARP server VC
+# ARPDEFQOS="ubr:max_pcr=700kbps"      # default QOS for IP over ATM VCs
+ONBOOT=yes
diff --git a/sysconfig/interfaces/ifcfg-br0 b/sysconfig/interfaces/ifcfg-br0
new file mode 100644 (file)
index 0000000..71bdcb0
--- /dev/null
@@ -0,0 +1,9 @@
+#      $Id: ifcfg-br0,v 1.1.2.1 2000/10/18 20:10:54 misiek Exp $
+#
+DEVICE=br0
+IP_1_ADDR=195.164.211.2
+IP4_PRIM_NR=1
+ONBOOT=yes
+BRIDGE_DEVS="eth0 eth1"
+SPANNING_TREE=yes
+
index e9767250af22e3f3c45c4712bdfc70528a6d340c..0e2d01dd5b1d5e87bbf30ea27629eb268f6fe9bc 100644 (file)
@@ -1,37 +1,63 @@
-#      $Id: ifcfg-description,v 1.10 2000/07/20 10:07:00 mis Exp $
-       DEVICE=<real device name>:<aliasnumber>
-or
-       DEVICE=<name>
-       [ BOOTPROTO={none|bootp|dhcp} ]
-if BOOTPROTO = dhcp ; then
-       [ DHCPOPTIONS={-D|-H|-R}
-fi
-IPADDR=<IPv4 addres>
-[ IPADDR_ALIASES="<IPv4 addres1> <IPv4 addres2> <...>" ]
-IPV6_ADDR="<IPv6 addres1>/<prefix len> <IPv6 addres2>/<prefix len> <...>"
-[ PREFIX= ]
-[ NETWORK= ]
-[ BROADCAST= ]
+#      $Id: ifcfg-description,v 1.10.2.1 2000/10/18 20:10:54 misiek Exp $
+DEVICE=<name>
+[ BOOTMETHOD={none|bootp|dhcp|pump} ]
+  You can specify which dhcp client to use with the DHCP_CLIENT, if
+  the DHCP_CLIENT is not specified we trying to launch in order :
+  /sbin/dhcpcd
+  /sbin/dhclient
+  /sbin/dhcpxd
+  /sbin/pump
+  if you have a preferred client define the DHCP_CLIENT variable.
+  You can also pass some options to dhcl client via DHCP_OPTIONS.
+
+[ BOOTMETHOD6={none|dhcp6|v4compat}
+  dhcp6 method isn't supported, yet.
+  v4compat uses available IPv4 addresses (ie. from DHCPv4)
+  and then convert them to IPv6 (IPv4-compatible) to use with
+  automatic tunnels
+
+
+IP_1_ADDR="(IPv4 or IPv6 address)/prefix"
+IP_1_AOPTS="broadcast xxx etc" (by default broadcast is autocalculated)
+IP_1_ROPTS=""
+
+IP_2_ADDR=
+IP_2_AOPTS= options for ip addr add
+IP_2_ROPTS= options for ip route add (currently used only for IP4_PRIM_NR)
+
+IP4_PRIM_NR="2"                # number X of primary IPv4 interface (IP_X_ADDR)
+IP4_SRC_NR="2"         # number X of IPv4 address for ip's ,,src'' parameter
+IP6_PRIM_NR=""         # 
+IP6_SRC_NR=""          # 
+
 [ ONBOOT={no|yes} ]
-[ MULTICAST={|no|yes} ]
-[ ARP={no|yes} ]
-[ SRC_ADDR=<IPv4 addres> ]
-       
-[ IPXFRAMETYPE={802.2|802.2TR|802.3|EtherII|SNAP} ]
-[ IPXNETWORK= ]
-[ IPXPRIMARY={no|yes} ]
-       
+[ MULTICAST={|no|yes} ]        - for eth automamaticly set to yes
+[ ARP={no|yes} ]       - for eth automamaticly set to yes
+
+[ IPX=yes|no ]
+if     IPX=yes ; then
+
+       IPXNETNUM_{802_2,802_2TR,802_3,EtherII,SNAP}
+       IPXPRIMARY_{802_2,802_2TR,802_3,EtherII,SNAP}=yes|no
+       IPXACTIVE_{802_2,802_2TR,802_3,EtherII,SNAP}=yes|no
+fi
+
 [ MTU= ]
 [ METRIC= ]
 
 [ QDISC= ]
 
+[ DEFAULTHANDLING=yes|no ] (used in configuration for ATM interfaces,
+                           obsolete variable)
+[ HANDLING=0|1|2|3 ] (0 is default; used ie. in ATM configuration, for
+                     details see ifup script)
+
 if     DEVICE=eth* ; then
 
        [ MEDIA={auto|10baseT|10base2|AUI} ]
        [ MAC=<hw addres> ]
        
-elif   DEVICE=ppp* || DEVICE=slip* ; then
+elif   DEVICE=ppp* || DEVICE=sl* ; then
        
        PERSIST=yes|no
        MODEMPORT=<device, say /dev/modem>
@@ -41,31 +67,73 @@ elif        DEVICE=ppp* || DEVICE=slip* ; then
        if      DEVICE=ppp* ; then
        
                AUTH=yes|no
+               PEERDNS=yes|no
                DEFROUTE=yes|no
                ESCAPECHARS=yes|no
                HARDFLOWCTL=yes|no (yes imples "modem crtscts" options)
                PPPOPTIONS=<arbitrary option string>
                PAPNAME=<"name $PAPNAME" on pppd command line>
-               REMIP=<remote ip address, normally unspecified>
+               REMIP=<remote ip4 address, normally unspecified>
+               REMIP6=<remote ip6 address, normally unspecified>
                MRU=
                DISCONNECTTIMEOUT=<number of seconds, default currently 5>
                RETRYTIMEOUT=<number of seconds, default currently 60>
                INITSCRIPT=<modem command>
                DATAFORCHAT=<list of variables>
                <anything>=<anything> (for chat script)
+               IPV6_PPP=yes|no (use IPv6 for ppp ?)
+               if IPV6_PPP = yes ; then
+                       IPV6_CP_USEV4=yes|no (use local IPv4 mapped addresses
+                                             as IPv6 addresses)
+                       IPV6_CP_PERSISTENT=yes|no (use EUI-48 addresses
+                                                  as IPv6 addresses)
+                       or by default use address specified by IP6_PRIM_NR
+                       and REMIP6
+               fi
+       fi
 
+       if      DEVICE=sl* ; then       (SLIP)
+               DIRECT_CONNECT=yes|no (dirrect connection via slattach ?)
+               PROTOCOL=slip|cslip|adaptive
+               REMIP=<remote ip4 address>
+               REMIP6=<remote ip6 address, normally unspecified>
        fi
-fi
 
-# You can also run some other programs *after* uping od downing
-# device. Just create functions run_up() and run_down()
-run_up()
-{
-       echo "This will be executed after uping device !"
-}
-
-run_down()
-{
-       echo "This will be executed after downing device !"
-}
+elif   DEVICE=br* ; then       /* Bridge */
+
+       BRIDGE_DEVS=<list of devices betwen which do bridging>
+                   Note: separation configuration for devices in this list
+                         should be avoided !
+       AGEING=<ethernet (MAC) address ageing time in seconds>
+       GCINT=<garbage collection interval time for the bridge in seconds>
+
+       SPANNING_TREE=yes|no (enable SPT - Spanning Tree Protocol)
+       if      SPANNING_TREE=yes ; then
+                       BRIDGEPRIO=<bridge's priority; 0-65535; less == better>
+                       FD=<bridge forward delay time in seconds>
+                       HELLO=<bridge hello time in seconds>
+                       MAXAGE=<maximum message age in seconds>
+                       PATHCOST_PORT=<port number>
+                       PATHCOST=<cost of the port specified in PATHCOST_PORT>
+                               Note: both PATHCOST_PORT and PATHCOST must be
+                                     specified to set cost of port
+                       PORTPRIO_PORT=<port>
+                       PORTPRIO=<port priority used by port selection algorithms;
+                                 a number between 0 and 255>
+                               Note: see note above
+       fi
+       
+elif   DEVICE=lec* ; then      /* ATM LAME  */
+
+       VLAN_NAME=
+       VLAN_FORESWITCH_NAME="$HOSTNAME-$VLAN_NAME"
+       
+elif   DEVICE=atm* ; then      /* ATM CLIP */
+
+       ARPSRV_ATMADDR=switch-qaa0        # ATM address of ATMARP server; omit if local
+       ARPSRV_IPADDR=192.168.0.10        # IP address of ATMARP server
+       # ARPSRVQOS="ubr:max_pcr=100kbps" # QOS of the ATMARP server VC
+       # ARPDEFQOS="ubr:max_pcr=700kbps" # default QOS for IP over ATM VCs
+       
+fi
 
diff --git a/sysconfig/interfaces/ifcfg-lec0 b/sysconfig/interfaces/ifcfg-lec0
new file mode 100644 (file)
index 0000000..d6a7be5
--- /dev/null
@@ -0,0 +1,9 @@
+#
+# /etc/sysconfig/interfaces/ifcfg-lec* - LANE interfaces
+#
+DEVICE=lec0
+IP_1_ADDR=10.1.1.1/24
+IP4_PRIM_NR=1
+VLAN_NAME=default
+VLAN_FORESWITCH_NAME="$HOSTNAME-$VLAN_NAME"
+ONBOOT=yes
index 97101c5f1fda2552111d3d03800d709d0340f656..c963f6286c4d76b3d6bcd902becc1af97cd69207 100644 (file)
@@ -1,5 +1,5 @@
 # (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
-# $Id: ifcfg-ppp0.leased1,v 1.4 2000/04/21 17:39:40 jajcus Exp $
+# $Id: ifcfg-ppp0.leased1,v 1.4.2.1 2000/10/18 20:10:54 misiek Exp $
 # 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).
@@ -7,9 +7,9 @@
 DEVICE=ppp0
 CHATSCRIPT=/etc/sysconfig/interfaces/data/chat-ppp0.leased1
 ONBOOT=yes
-IPADDR=192.168.255.254
+IP_1_ADDR=192.168.255.254/30
+IP4_PRIM_NR=1
 REMIP=192.168.255.253
-PREFIX=30
 HARDFLOWCTL=yes
 MODEMPORT=/dev/ttyS1
 LINESPEED=115200
index e019e264bbd88fa031932be3959075527ca39607..858927b0ff3c30d47941750820cea9bd93e98b6b 100644 (file)
@@ -1,5 +1,5 @@
 # (c) 1999 Grzegorz Stanislawski <stangrze@open.net.pl>
-# $Id: ifcfg-ppp0.leased2,v 1.3 1999/07/13 12:49:36 misiek Exp $
+# $Id: ifcfg-ppp0.leased2,v 1.3.2.1 2000/10/18 20:10:54 misiek Exp $
 # config file for setting up hardwired (leased) serial line.
 #  This config assumes "transparent" modem (in ex. goramo), null modem
 # cable or current loop. 
@@ -13,9 +13,9 @@
 # if You don't have any jumper YOU HAVE BEEN WARNED. 
 DEVICE=ppp0
 ONBOOT=yes
-IPADDR=192.168.255.254
+IP_1_ADDR=192.168.255.254/30
+IP4_PRIM_NR=1
 REMIP=192.168.255.253
-PREFIX=30
 HARDFLOWCTL=yes
 MODEMPORT=/dev/ttyS1
 LINESPEED=115200
index cae240cd06aec8b4b9c2a4c04cb3583e141cd65f..d03b1b11ab358c01cb798d0b294e005fd36ae051 100644 (file)
@@ -19,3 +19,5 @@ INITSTRING=ATe0s2=255
 DATAFORCHAT="USER PASSWORD INITSTRING"
 
 REPORTFILE=/var/log/ppp0.log
+               
+
index 6722e3261b93d603726f39a0b54de7e584b2d1df..08a385cbdb842dc12552a9c65284cefb312c8856 100644 (file)
@@ -1,13 +1,13 @@
-#      $Id: ifcfg-sl0,v 1.2 1999/07/13 12:49:36 misiek Exp $
+#      $Id: ifcfg-sl0,v 1.2.2.1 2000/10/18 20:10:54 misiek Exp $
 #
 DEVICE=sl0
-IPADDR=195.164.211.2
+IP_1_ADDR=195.164.211.2
+IP4_PRIM_NR=1
 ONBOOT=yes
 MODEMPORT=/dev/ttyS0
 LINESPEED=57600
 REMIP=194.181.19.1
 MTU=296
-DEFROUTE=yes
 PROTOCOL=slip
 # say no for dip && modem connection
 # say yes for direct connection to for example router via slattach
index 282883cbaedd176e86ceb95951478a949d7c7c47..de1f961fb3bc588f60b5087a0cd5e8d01579ed8a 100644 (file)
@@ -1,13 +1,12 @@
-#      $Id: tnlcfg-description,v 1.2 1999/09/15 10:15:35 misiek Exp $
+#      $Id: tnlcfg-description,v 1.2.2.1 2000/10/18 20:10:54 misiek Exp $
 #
 # In this file you can also put all configuration data instead
 # of using second file named ifcfg-tunnel_name.
 
-MODE={ipip|gre|sit|ipxip}
+MODE={ipip|gre|sit}
+ONBOOT=yes|no
 DEVICE=<device name>
-if     MODE=ipxip ; then
-       ?
-else   MODE=ipip || MODE=gre || MODE=sit ; then
+if     MODE=ipip || MODE=gre || MODE=sit ; then
 
        REMOTEADDR=<IPv4 addres>
        [ LOCALADDR=<IPv4 addres> ]
@@ -15,15 +14,31 @@ else        MODE=ipip || MODE=gre || MODE=sit ; then
 
        [ TTL= ]
        [ TOS= ]
-       [ SEQ={no|yes} ]
-       [ ISEQ={no|yes} ]
-       [ OSEQ={no|yes} ]
-       [ KEY= ]
-       [ IKEY= ]
-       [ OKEY= ]
-       [ CSUM={no|yes} ]
-       [ ICSUM={no|yes} ]
-       [ OCSUM={no|yes} ]
        [ PMTUDISC={no|yes} ]
+
+       if      MODE=gre ; then
+       
+               [ KEY= ]
+               [ IKEY= ]
+               [ OKEY= ]
+               [ ISEQ={no|yes} ]
+               [ ISEQ={no|yes} ]
+               [ OSEQ={no|yes} ]
+               [ CSUM={no|yes} ]
+               [ ICSUM={no|yes} ]
+               [ OCSUM={no|yes} ]
+
+       fi
+
+               
+else   MODE=four ; then
+
+        REMOTEADDR=<IPv6 addres>
+       LOCALADDR=<IPv6 addres>
+       
+       [ PRIORITY= ]
+       [ HOPLIMIT= ]
+       [ ENCAPLIMIT= ]
+       
 fi
        
index 6e141c8ca150ec93d8a6c66f7a130a839d9d9884..83daa838e3d182aeef5d1244362e0722e8d33d48 100644 (file)
@@ -1,3 +1,4 @@
+ONBOOT=yes
 MODE=sit
 DEVICE=icm
 REMOTEADDR=193.219.28.246
index 313a6e024f4dffbc9de8b32f3b12dd3fed7fc06d..96b43304e8a9fc3769edbc9c9bdfc238f691142a 100644 (file)
@@ -1,12 +1,15 @@
-# $Id: network,v 1.8 2000/02/03 11:50:05 misiek Exp $
+# $Id: network,v 1.8.2.1 2000/10/18 20:10:51 misiek Exp $
 ######################################################################
 # MAIN PART
 
-# Do you need networking ?
+# Do you need IPv4 or IPv6 networking ?
 NETWORKING=yes
 
-# Do you need IPv6 networking, too ?
-IPV6_NETWORKING=no
+# Do you need IPv4 networking ?
+IPV4_NETWORKING=yes
+
+# Do you want IPv4 forwarding ?
+IPV4_FORWARDING=no
 
 # Set hostname here (only hostname)
 HOSTNAME=pldmachine
@@ -14,6 +17,7 @@ HOSTNAME=pldmachine
 # Set domainname here
 NISDOMAIN=
 
+# IPv4 gateway
 GATEWAY=
 GATEWAYDEV=
 
@@ -24,6 +28,23 @@ IPXAUTOFRAME=
 IPXINTERNALNETNUM=
 IPXINTERNALNODENUM=
 
+# Do you need IPv6 networking ?
+IPV6_NETWORKING=no
+
+# Do you want IPv6 forwarding ?
+IPV6_FORWARDING=no
+
+# Enable tunnel interfaces configuration ?
+IPV6_TUNNELCONFIG=no
+
+# IPv6 gateway
+GATEWAY6=
+GATEWAY6DEV=
+
+# Global route for IPv6 host with IPv6 forwarding
+IPV6_GLOBALROUTEGW=
+IPV6_GLOBALROUTEDEV=
+
 # Reading configuration from LDAP
 
 # Do you want to use LDAP?
@@ -37,114 +58,10 @@ LDAP_BASE_DN=
 # Do you want set static arp table (based on /etc/ethers config file) ?
 STATIC_ARP=no
 
-######################################################################
-# IPv4 goodies
-
-# Do you want enable IPv4 forwarding ?
-IPV4_FORWARDING=no
-
-# 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 IPV4_RETRANS_COLLAPSE to ,,yes''. 
-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"
-
-######################################################################
-# IPv6 goodies
-
-# Do you want enable IPv6 forwarding ?
-IPV6_FORWARDING=no
-
-# Enable tunnel interfaces configuration ?
-IPV6_TUNNELCONFIG=no
+# Specify interface on which you want to enable tleds software
+# (also you need tleds package installed) -- default set to no
+TLEDS_DEV=no
 
-# Start Classic router discovery daemon ?
-# You need iputils package installed for this option.
-IPV6_RDISC=no
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
 
-# rdisc mode: "host" or "router". Default: "host".
-IPV6_RDISC_MODE=host
index 66b8868c229a4e0ca3c3346be80b43f554020066..93ecf3d81695dca728af7f363c829a6221675397 100644 (file)
@@ -11,11 +11,16 @@ sbin_SCRIPTS = \
 networkscriptsdir = @networkscriptsdir@
 
 networkscripts_SCRIPTS = \
+       ifdown-br \
+       ifdown-lec \
        ifdown-ppp \
        ifdown-post \
        ifdown-sl \
        ifup-aliases \
+       ifup-atm \
+       ifup-br \
        ifup-ipx \
+       ifup-lec \
        ifup-plip \
        ifup-post \
        ifup-ppp \
index 85403b3286091efe41787154506b20565bea025d..620cc49e9705d745748fefa3cac7e8858eb34b87 100755 (executable)
@@ -1,27 +1,27 @@
 #!/bin/sh
 #
-#      $Id: ifdown,v 1.24 2000/05/31 17:55:05 zagrodzki Exp $
+#      $Id: ifdown,v 1.24.2.1 2000/10/18 20:10:54 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
 DEV=$1
 
 [ -z "$DEV" ] && {
-    echo "usage: ifdown <device name>" >&2
+    nls "usage: %s <device name>" "ifdown" >&2
     exit 1
 }
 
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
-
 if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
 else
        CONFIG="$DEV"
 fi
 
-if [ `id -u` != 0 ]; then
+if [ "$(id -u)" != "0" ]; then
     if [ -x /sbin/usernetctl ]; then
         exec /sbin/usernetctl $CONFIG down
     fi
@@ -31,60 +31,58 @@ fi
 
 source_config
 
-if [ "$BOOTPROTO" = bootp ]; then
-    DYNIP=pump
-fi
-
-if [ "$BOOTPROTO" = "dhcp" ]; then
-    DYNIP=dhcpcd
-fi
-
-# IPv4, IPv6 or both ?
-[ -n "$IPV6_ADDR" ]             && IPv6=yes || IPv6=no
-[ -n "$IPADDR" -o -n "$DYNIP" ] && IPv4=yes || IPv4=no
+# set all major variables
+setup_ip_param
 
-if [ -z "$PREFIX" -a -n "$NETMASK" ]; then
-       PREFIX="`calcprefix $NETMASK`"
-fi
-
-if [ -z "$NETMASK" -a -n "$PREFIX" ]; then
-       NETMASK="`calcnetmask $PREFIX`"
-fi
-
-FULLDEVNAME="$DEVICE"
-DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
 OTHERSCRIPT="/etc/sysconfig/network-scripts/ifdown-${DEVICETYPE}"
 
+# shutdown tleds software
+if [ "$TLEDS_DEV" = "$DEVICE" -a -x /usr/bin/tleds ]; then
+       /usr/bin/tleds -qk "$DEVICE"
+fi
+       
 if [ -x $OTHERSCRIPT ]; then
-    if [ "$DEFAULTHANDLING" = "yes" ]; then
-        $OTHERSCRIPT $CONFIG $2
-    else
-       $OTHERSCRIPT $CONFIG $2
-       exit $?
+    if [ "$HANDLING" -eq 0 ]; then
+       exec $OTHERSCRIPT $CONFIG $2
+    elif [ "$HANDLING" -eq 1 ]; then
+       $OTHERSCRIPT $CONFIG $2
     fi
 fi
 
-if echo "$FULLDEVNAME" | grep -q ':' ; then
-    ISALIAS=yes
-else
-    ISALIAS=no
+# Check to make sure the device is actually up
+check_device_down && exit 0
+
+if [ "$BOOTMETHOD" = "bootp" -o "$BOOTMETHOD" = "pump" ]; then
+       /sbin/pump -r -i ${DEVICE}
 fi
 
-if [ "$ISALIAS" = "yes" ]; then
-       if [ "$IPv4" = "yes" ]; then
-               ip -family inet addr del ${IPADDR}/${PREFIX} dev ${DEVICE} label ${FULLDEVNAME}
-       fi
-               for ADDR in ${IPV6_ADDR} ; do
-                       ip -family inet6 addr del ${ADDR} dev ${DEVICE} label ${FULLDEVNAME}
-               done
-else
-    if [ "$DYNIP" = "dhcpcd" ]; then
-       /sbin/dhcpcd -k $FULLDEVNAME
+if [ "$BOOTMETHOD" = "dhcp" ]; then
+    if [ -x /sbin/dhcpcd ];then
+        /sbin/dhcpcd -k ${DEVICE}
+    elif [ -x /sbin/dhclient ];then
+        if [ -f /var/run/dhclient.pid ];then
+            PID=$(cat /var/run/dhclient.pid)
+            if ps ax --no-header|grep -q $PID;then
+                kill $PID
+            fi
+        fi
+    elif [ -x /sbin/dhcpxd ];then
+        /sbin/dhcpxd -k ${DEVICE}
+    elif [ -x /sbin/pump ];then
+        pump -r -i ${DEVICE}
     fi
-    ip link set ${DEVICE} down
-    ip addr flush dev ${DEVICE} 2> /dev/null
 fi
 
+ip link set ${DEVICE} down
+ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+
+if [ "$HANDLING" -eq 4 ]; then
+    exit 0
+fi
+       
 exec /etc/sysconfig/network-scripts/ifdown-post $CONFIG
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/sysconfig/network-scripts/ifdown-br b/sysconfig/network-scripts/ifdown-br
new file mode 100755 (executable)
index 0000000..d7ba13e
--- /dev/null
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+#    ifdown-br - bridge configuration script
+#    Copyright (C) 2000  Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: ifdown-br,v 1.1.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+cd /etc/sysconfig/network-scripts
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+CONFIG=$1
+source_config
+
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
+       exit
+fi
+
+if [ ! -x /sbin/brctl ]; then
+       nls "%s is missing. Can't continue." "/sbin/brctl"
+       exit 1
+fi
+
+. /etc/sysconfig/network
+
+# set all major variables
+setup_ip_param
+
+# set device down and forget all addresses
+for device in ${BRIDGE_DEVS} ${DEVICE}; do
+       ip link set ${device} down
+       ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
+       brctl delif ${DEVICE} ${device}
+done
+
+brctl delbr ${DEVICE}
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/sysconfig/network-scripts/ifdown-lec b/sysconfig/network-scripts/ifdown-lec
new file mode 100755 (executable)
index 0000000..8f4dde2
--- /dev/null
@@ -0,0 +1,77 @@
+#!/bin/sh
+#
+#    ifdown-lec - ATM LANE interfaces configuration script
+#    Copyright (C) 1999, 2000 Robert ¦laski <robin@atm.com.pl>
+#    Copyright (C) 2000 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: ifdown-lec,v 1.1.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+DEV=$1
+
+[ -z "$DEV" ] && {
+    nls "usage: %s <device name>" ifup-lec >&2
+    exit 1
+}
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+if [ -r /etc/sysconfig/atm ]; then
+       . /etc/sysconfig/atm
+else
+       exit 0
+fi
+
+if is_no "$LANE"; then
+       exit 0
+fi
+
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+else
+        CONFIG="$DEV"
+fi
+               
+source_config
+
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
+        exit
+fi
+
+if [ ! -f /var/run/zeppelin-$DEVICE.pid ]; then
+    nls "zeppelin %s isn't running, or we didn't start it" "$DEVICE"
+    exit 0
+fi
+
+PID=$(cat /var/run/zeppelin-$DEVICE.pid)
+[ -z "$PID" ] && exit 1
+
+kill -TERM $PID >/dev/null 2>&1
+sleep 1
+[ -d /proc/$PID ] && kill -KILL $PID > /dev/null 2>&1
+
+rm -f "/var/run/zeppelin-$DEVICE.pid"
+       
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 11b0c8ec1f5c050823f4696a4f167adc4aa60525..409b1919c98c8b658c342edddc4179e4bd7e02bb 100755 (executable)
@@ -1,12 +1,10 @@
 #!/bin/sh
 #
-#      $Id: ifdown-post,v 1.10 2000/03/27 16:07:52 misiek Exp $
+#      $Id: ifdown-post,v 1.10.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 # This should be called whenever an interface goes down, not just when
 # it is brought down explicitly.
 
-run_down() { :; }
-
 CONFIG=$1
 . /etc/sysconfig/network
 . /etc/rc.d/init.d/functions
@@ -14,23 +12,22 @@ CONFIG=$1
 
 source_config
 
-# full device name as specified by user
-FULLDEVNAME="$DEVICE"
-# type of device for example "dummy" or "eth"
-DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
-DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
-
-if echo "$FULLDEVNAME" | grep -q ':' ; then
-        ISALIAS=yes
-else
-        ISALIAS=no
-fi
+# set all major variables
+setup_ip_param
+
+# set REALDEVICE
+get_ppp_device_and_pid
 
-# execute run_up() function (if available in device configuration file)
-[ "$ISALIAS" = "no" ] && run_down
+# Delete root queueing discipline
+if [ -n "$QDISC" ]; then
+       tc qdisc del dev "$REALDEVICE" root $QDISC
+fi
 
 # Notify programs that have requested notification
 do_netreport
 
 exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 4fd495ba5eb2742694e8ff099b3f9c66c57d0dc0..06d0d56308bf4d86c2c32ebe757014e7dc7e07b1 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifdown-ppp,v 1.9 2000/04/21 17:44:22 jajcus Exp $
+#      $Id: ifdown-ppp,v 1.9.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -16,6 +16,9 @@ if [ ! -f /var/run/ppp-$DEVICE.pid ]; then
     exit 0
 fi
 
+# set all major variables
+setup_ip_param
+
 get_ppp_device_and_pid
 
 if [ -z "$PID" ]; then
@@ -27,7 +30,7 @@ rm -f /var/run/ppp-$DEVICE.pid
 # pppd might have chat as a child; remember chat's pid to kill after pppd.
 # (After, not before, so that pppd doesn't just restart it).
 
-CHATPID=`ps axl | awk '$4 ~ /^'"$PID"'$/ {print $3}' 2>/dev/null`
+CHATPID=$(ps axl | awk '$4 ~ /^'"$PID"'$/ {print $3}' 2>/dev/null)
 
 kill $PID > /dev/null 2>&1
 [ -n "$CHATPID" ] && kill $CHATPID > /dev/null 2>&1
@@ -49,3 +52,7 @@ else
 fi
 
 exit 1
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index ae60b0dce5f846938337cdf79383ec871a9bcc0d..963e8e530b09e13c1d9dad006dbae87c2970045f 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifdown-sl,v 1.10 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifdown-sl,v 1.10.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -11,17 +11,20 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 CONFIG=$1
 source_config
 
+# set all major variables
+setup_ip_param
+
 # signals ifup-sl not to persist
 rm -f /var/run/sl-$DEVICE.dev
 
 # we can use dip or direct slip connection via slattach
 if is_no "$DIRECT_CONNECT"; then
-PID=`pidof dip-$DEVICE`
+PID=$(pidof dip-$DEVICE)
 else
-PID=`pidof slattach`
+PID=$(pidof slattach)
 for x in $PID; do
        if grep -q "$MODEMPORT" /proc/$x/cmdline; then
-       logger -p daemon.info -t ifdown-sl "signal TERM send to \"`ps -o cmd= $x`\" - this should be slattach"
+       logger -p daemon.info -t ifdown-sl "signal TERM send to \"$(ps -o cmd= $x)\" - this should be slattach"
        kill -TERM $x
        PID=$x
        fi
@@ -33,7 +36,7 @@ fi
 # Grab the PID of connected dial-out daemon.
 #
 if [ -z "$PID" ]; then
-  PID=`pidof -- -dip\ \($IPADDR\)`
+  PID=$(pidof -- -dip\ \($IPADDR\))
 fi
 if [ -z "$PID" ]; then
   exit 1
@@ -52,10 +55,14 @@ fi
 
 kill -KILL $PID > /dev/null 2>&1
 if [ -d /proc/$PID ]; then
-  logger -p daemon.info -t ifdown-ppp "ifdown-ppp unable to kill pppd-$DEVICE" &
+  logger -p daemon.info -t ifdown-sl "ifdown-sl unable to kill sl-$DEVICE" &
 else
   /etc/sysconfig/network-scripts/ifdown-post $1
 fi
 
 exit 1
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 99ad366b67aa37520bf6d2f97ca28aff8a2cd2ed..1468ed67b0a0a1fe322755cd10a12bb9b1c1ee8e 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup,v 1.42 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup,v 1.42.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -10,10 +10,11 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 need_hostname
 
+# device name must be ifcfg-somename
 DEV=$1
 
 [ -z "$DEV" ] && {
-    nls "usage: ifup <device name>" >&2
+    nls "usage: %s <device name>" "ifup" >&2
     exit 1
 }
 
@@ -39,188 +40,141 @@ fi
 
 IPSETUP=no
 
-# full network device name
-FULLDEVNAME="$DEVICE"
-# detect network device type (dummy, eth ..)
-DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-# real name of device (is eth0 for eth0,eth0:1,eth0:alias)
-DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
-
-if echo "$FULLDEVNAME" | grep -q ':' ; then
-    ISALIAS=yes
-else
-    ISALIAS=no
-fi
-
-# Old BOOTP variable
-if is_yes "$BOOTP"; then
-    BOOTPROTO=bootp
-fi
-
-if [ "$BOOTPROTO" = bootp ]; then
-    DYNIP=pump
-fi
-
-if [ "$BOOTPROTO" = "dhcp" ]; then
-    DYNIP=dhcpcd
-fi
-
-# IPv4, IPv6 or both ?
-[ -n "$IPV6_ADDR" ]             && IPv6=yes || IPv6=no
-[ -n "$IPADDR" -o -n "$DYNIP" ] && IPv4=yes || IPv4=no
-
-# Tunnel device ?
-[ -f /etc/sysconfig/interfaces/tnlcfg-${FULLDEVNAME} ] && TNL=yes || TNL=no
-
-if [ "$TNL" = "yes" ]; then
-       TNLOPTS="onlink"
-fi
-
-if [ -z "$PREFIX" -a -z "$NETMASK" ]; then
-       PREFIX="32"
-fi
-
-if [ -z "$PREFIX" -a -n "$NETMASK" ]; then
-       PREFIX="`calcprefix $NETMASK`"
-fi
-
-if [ -z "$NETMASK" -a -n "$PREFIX" ]; then
-       NETMASK="`calcnetmask $PREFIX`"
-fi
-
-is_yes "$MULTICAST"      && MULTICAST=on               || MULTICAST=off
-[ -n "$SRC_ADDR" ]       && SRC_ADDR="src ${SRC_ADDR}" || SRC_ADDR=""
-[ -n "$SCOPE" ]          && SCOPE="scope ${SCOPE}"     || SCOPE=""
-
-if [ "$ARP" ]; then
-       is_yes "$ARP"    && ARP=on      || ARP=off
-elif [ "$DEVICETYPE" = "eth" ]; then
-       ARP=on
-else
-       ARP=off
-fi
+# set all major variables
+setup_ip_param
 
 OTHERSCRIPT="/etc/sysconfig/network-scripts/ifup-${DEVICETYPE}"
 
 if [ -x "$OTHERSCRIPT" ]; then
-    if [ "$DEFAULTHANDLING" = "yes" ]; then
+    if [ "$HANDLING" -eq 0 ]; then
+       exec $OTHERSCRIPT $CONFIG $2
+    elif [ "$HANDLING" -eq 1 ]; then
         $OTHERSCRIPT $CONFIG $2
-    else
-        exec $OTHERSCRIPT $CONFIG $2
     fi
 fi
 
 # is this device available? (this catches PCMCIA devices for us)
 if ! (/sbin/ip link set multicast ${MULTICAST} dev ${DEVICE} > /dev/null 2>&1); then
-    echo "Delaying ${FULLDEVNAME} initialization."
-    exit 0
+    nls "Delaying %s initialization" ${DEVICE}
+    exit 1
 fi
 
-if [ "$SLAVE" = "yes" -a "$ISALIAS" = "no" -a "$MASTER" != "" -a -x /sbin/ifenslave ]; then
-    RFLAG="" ; [ "${RECIEVE-ONLY}" = "yes" ] && RFLAG="-r"
+if is_yes "$SLAVE" && [ -n "$MASTER" -a -x /sbin/ifenslave ]; then
+    RFLAG="" && is_yes "${RECIEVE-ONLY}" && RFLAG="-r"
 
     ip link set ${DEVICE} down
-    echo "Enslaving $DEVICE to $MASTER"
+    nls "Enslaving %s to %s" "$DEVICE" "$MASTER"
     ifenslave $RFLAG "$MASTER" "$DEVICE"
 
     exit 0
 fi
 
-if [ -n "$MACADDR" ]; then
+if [ "$DEVICETYPE" = "eth" -a -n "$MACADDR" ]; then
    ip link set ${DEVICE} address ${MACADDR}
 fi
 
-if [ -n "$DYNIP" -a "$ISALIAS" = "no" ]; then
-
-    echo -n "`nls "Determining IP information for"` $FULLDEVNAME..."
-    if [ "$DYNIP" = "pump" ]; then
-       if /sbin/pump -i $FULLDEVNAME ; then
-          nls " done."
-       else
-          nls " failed."
-          exit 1
-       fi
-    else
-       if /sbin/dhcpcd $FULLDEVNAME "$DHCPOPTIONS" ; then
-          nls " done."
-       else
-          nls " failed."
-          exit 1
-       fi
-    fi
+ip link set ${DEVICE} multicast ${MULTICAST} arp ${ARP} down
 
-else
+if [ "$HANDLING" -eq 2 ]; then
+       exit 0
+fi
 
-    if [ "$IPv4" = "yes" ]; then
-        if [ -z "$PREFIX" ]; then
-           eval `/bin/ipcalc --prefix ${IPADDR}`
-        fi
+if [ -n "$BOOTMETHOD" -a "$BOOTMETHOD" != "none" ]; then
 
-        if [ -z "$BROADCAST" ]; then
-           eval `/bin/ipcalc --broadcast ${IPADDR} ${NETMASK}`
-        fi
+    if is_yes "$IPV4_NETWORKING"; then
+       if [ "$BOOTMETHOD" = "bootp" -o "$BOOTMETHOD" = "pump" ]; then
+               DHCP_CLIENT=/sbin/pump
+       fi
+    
+       if [ -z "$DHCP_CLIENT" ]; then
+               if [ -x /sbin/dhcpcd ]; then
+                       DHCP_CLIENT=/sbin/dhcpcd
+               elif [ -x /sbin/dhclient ]; then
+                       DHCP_CLIENT=/sbin/dhclient
+               elif [ -x /sbin/dhcpxd ]; then
+                       DHCP_CLIENT=/sbin/dhcpxd
+               elif [ -x /sbin/pump ]; then
+                       DHCP_CLIENT=/sbin/pump
+               else
+                       nls "Can't find a dhcp client."
+                       exit 1
+               fi
+       fi
+       
+       DHCP_ARGS=
+       if [ -n "$DHCP_CLIENT" ]; then
+               case $(basename $DHCP_CLIENT) in
+                       pump)
+                       [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
+                       DHCP_ARGS="$DHCP_ARGS -i $DEVICE"
+                       ;;
+                       dhcpcd)
+                       [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-h $DHCP_HOSTNAME"
+                       DHCP_ARGS="$DHCP_ARGS $DEVICE"
+                       ;;
+                       dhcpxd)
+                       [ -n "$DHCP_HOSTNAME" ] && DHCP_ARGS="-H $DHCP_HOSTNAME"
+                       DHCP_ARGS="$DHCP_ARGS $DEVICE"
+                       ;;
+                       dhclient)
+                       # Can't specify a host with dhclient ?
+                       DHCP_ARGS="$DEVICE"
+                       ;;
+               esac
+       fi
+       DHCP_ARGS="$DHCP_OPTIONS $DHCP_ARGS"
+       
+       if ! run_cmd "$(nls "Determining IP information for") $DEVICE $(basename $DHCP_CLIENT)" $DHCP_CLIENT $DHCP_ARGS ; then
+               exit 1
+       fi
 
-        if [ -z "$NETWORK" ]; then
-           eval `/bin/ipcalc --network ${IPADDR} ${NETMASK}`
-        fi
+       # give time for determining IP information
+       check_device_down && sleep 1 && check_device_down && sleep 3
+       check_device_down && ip link set ${DEVICE} up
     fi
 
-    ip link set ${DEVICE} multicast ${MULTICAST} arp ${ARP} up
+else
 
-    if [ "$IPv4" = "yes" ]; then
-       if [ -n "$REMIP" ]; then
-           ip -family inet addr add ${IPADDR} peer ${REMIP} dev ${DEVICE} label ${FULLDEVNAME} ${SCOPE}
-       else    
-           ip -family inet addr add ${IPADDR}/${PREFIX} broadcast ${BROADCAST} dev ${DEVICE} label ${FULLDEVNAME} ${SCOPE}
+    # IPv4 in use ?
+    if is_yes "$IPV4_NETWORKING" && [ -n "$IP4_PRIM_NR" ]; then
+       # If broadcast is missing then autocalculate it
+       if ! (echo $IP4ADDROPT | egrep -q "brd|broadcast"); then
+               IP4ADDROPT="brd + ${IP4ADDROPT}"
        fi
-        # Another IPv4 aliases support
-        for ADDR4 in ${IPADDR_ALIASES} ; do
-           ip -family inet addr add ${ADDR4} dev ${DEVICE} label ${FULLDEVNAME} broadcast \+
-        done
-    fi
-
-
-    # IPv6 rules
-    if is_yes "${IPV6_NETWORKING}"; then
-
-      for ADDR6 in ${IPV6_ADDR} ; do
-       ip -family inet6 addr add ${ADDR6} dev ${DEVICE} label ${FULLDEVNAME}
-      done  
 
+       if [ -n "$REMIP" ]; then
+               ip addr add ${IP4ADDR} peer ${REMIP} dev ${DEVICE} ${IP4ADDROPT}
+       else
+               ip addr add ${IP4ADDR} dev ${DEVICE} ${IP4ADDROPT}
+       fi
     fi
 
-    if [ "${GATEWAY}" != "" ]; then
-       if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${FULLDEVNAME}" ]; then
-           # set up default gateway
-           ip -family inet route add default via ${GATEWAY} dev ${DEVICE} ${SRC_ADDR} ${TNLOPTS}
-           DEFGW=${GATEWAY}
-       fi
+    # IPv6 in use ?
+    if is_yes "$IPV6_NETWORKING" && [ -n "$IP6_PRIM_NR" ]; then
+       ip addr add ${IP6ADDR} dev ${DEVICE} ${IP6ADDROPT}
     fi
 
-    if [ "$BOOTPROTO" = bootp -a "$ISALIAS" = no ]; then
-       if [ -n "$GATEWAYS" ]; then
-           for gw in $GATEWAYS; do
-               if [ "$gw" != "${DEFGW}" ]; then
-                   ip -family inet route add default via $gw dev ${DEVICE} ${SRC_ADDR} ${TNLOPTS}
-               fi
-           done
-       fi
+    # Set device up
+    ip link set ${DEVICE} up
 
-       if [ -n "$DNSSRVS" -a -n "$SEARCH" ]; then
-           echo "search $SEARCH" > /etc/resolv.conf
-           for dns in $DNSSRVS; do
-                   echo "nameserver $dns" >> /etc/resolv.conf
-           done
-       fi
+    # IPv4/6 gateways and default routes
+    setup_ip_gw_ro
+fi
 
-       if [ -n "$BOOTPHOSTNAME" -a -n "$NEEDHOSTNAME" ]; then
-           set_hostname $BOOTPHOSTNAME
-       fi
-    fi
+if [ "$HANDLING" -eq 3 ]; then
+       exit 0
 fi
 
 if is_yes "$IPX"; then
        /etc/sysconfig/network-scripts/ifup-ipx $DEVICE
 fi
 
+if [ "$HANDLING" -eq 4 ]; then
+       exit 0
+fi
+
 exec /etc/sysconfig/network-scripts/ifup-post $CONFIG
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 2cec903b1d9c83f1df3a92372050290d001f732c..d787cc34dcd7aeb46513089ef00e4a7363171721 100755 (executable)
@@ -1,38 +1,72 @@
 #!/bin/sh
 #
-#      $Id: ifup-aliases,v 1.10 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup-aliases,v 1.10.2.1 2000/10/18 20:10:55 misiek Exp $
 #
-# adds aliases of device $1
+# adds all addresses of device $1
 
 . /etc/sysconfig/network
 . /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
-if [ "$1" = "" ]; then
-       echo "usage: $0 <net-device>"
-       exit 1
-fi
+# device name must be ifcfg-somename
+DEV=$1
+
+[ -z "$DEV" ] && {
+    nls "usage: %s <device name>" "ifup-aliases" >&2
+    exit 1
+}
 
-# bash 2 is so much fun.
-if [ "$BASH_VERSINFO" ]; then
-        shopt -s nullglob
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
 else
-        allow_null_glob_expansion=foo
+        CONFIG="$DEV"
 fi
 
-cd /etc/sysconfig/interfaces/
+source_config
 
-for alias in ifcfg-$1:* ; do
-        [ -f $alias ] && /sbin/ifup $alias
+# set all major variables
+setup_ip_param
+                   
+# Add all addresses
+for nr in $(awk 'BEGIN { for (j=1; j<256; j++) print j}'); do
+       eval IP_ADDR="\$IP_${nr}_ADDR"
+       eval IP_ADDR_OPT="\$IP_${nr}_AOPTS"
+       eval IP_ROUTE_OPT="\$IP_${nr}_ROPTS"
+       
+       [ -z "$IP_ADDR" ] && continue
+       # Be sure that primary address is added
+       if [ "$IP_ADDR" = "$IP4ADDR" -o "$IP_ADDR" = "$IP6ADDR" ]; then
+               if (ip addr show dev $DEVICE | egrep -q "[[:space:]]${IP_ADDR}[[:space:]]"); then
+                       continue
+               fi
+       fi
+       # Check for IPv6 address
+       if (echo $IP_ADDR | grep -q ":"); then
+               if is_yes "${IPV6_NETWORKING}"; then
+                       ip -6 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}
+               fi
+       elif is_yes "${IPV4_NETWORKING}"; then
+               # If broadcast is missing then autocalculate it
+               if ! (echo $IP_ADDR_OPT | egrep -q "brd|broadcast"); then
+                       IP_ADDR_OPT="brd + ${IP_ADDR_OPT}"
+               fi
+               ip -4 addr add ${IP_ADDR} dev ${DEVICE} ${IP_ADDR_OPT}
+       fi
 done
 
-for alias in `find_ldap_aliases` ; do
-        /sbin/ifup $alias
-done
+# Setup IPv4-compatible addresses
+if is_yes "$IPV6_NETWORKING" && [ "$BOOTMETHOD6" = "v4compat" ]; then
+       # enable automatic tunnels
+       ip link set sit0 up
 
-if [ "$BASH_VERSINFO" ]; then
-        shopt -u nullglob
-else
-        unset allow_null_glob_expansion
+       # add v4compat addresses to device
+       for addr in $(ip -4 addr show scope global dev $DEVICE | \
+               awk '/inet/ { print $2 }' | awk -F"/" '{ print $1 }'); do
+               ip -6 addr add ::$addr dev $DEVICE
+       done
 fi
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/sysconfig/network-scripts/ifup-atm b/sysconfig/network-scripts/ifup-atm
new file mode 100755 (executable)
index 0000000..7d7ee6b
--- /dev/null
@@ -0,0 +1,81 @@
+#!/bin/sh
+#
+#    ifup-atm - ATM CLIP interfaces configuration script
+#    Copyright (C) 1999, 2000 Robert ¦laski <robin@atm.com.pl>
+#    Copyright (C) 2000 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: ifup-atm,v 1.1.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+DEV=$1
+
+[ -z "$DEV" ] && {
+    nls "usage: %s <device name>" "ifup-atm" >&2
+    exit 1
+}
+
+if [ -r /etc/sysconfig/atm ]; then
+       . /etc/sysconfig/atm
+else
+       exit 0
+fi
+
+if is_no "$CLIP"; then
+       exit 0
+fi
+
+if [ ! -x /sbin/atmarp ]; then
+        nls "%s is missing. Can't continue." "/sbin/atmarp"
+        exit 1
+fi
+               
+
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+else
+        CONFIG="$DEV"
+fi
+               
+source_config
+
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
+        exit
+fi
+
+# set all major variables
+setup_ip_param
+
+# check again in case of manuall interface starting
+atm_daemons_start
+
+INTERFACE=$(echo "$DEVICE" | awk ' { gsub(/^lec/,NIL); print $0 } ')
+
+atmarp -c $INTERFACE
+atmarp -s $ARPSRV_IPADDR $ARPSRV_ATMADDR arpsrv
+
+# FIXME. Ask Robert about these. --misiek
+#[ -z "$ARPDEFQOS" ] || atmarp -q $NETWORK $ARPDEFQOS
+#[ -z "$ARPSRV" ] || atmarp -s $NETWORK $ARPSRV arpsrv \
+#  `[ -z "$ARPSRVQOS" ] || echo qos $ARPSRVQOS`
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/sysconfig/network-scripts/ifup-br b/sysconfig/network-scripts/ifup-br
new file mode 100755 (executable)
index 0000000..688926e
--- /dev/null
@@ -0,0 +1,90 @@
+#!/bin/sh
+#
+#    ifup-br - bridge configuration script
+#    Copyright (C) 2000  Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: ifup-br,v 1.1.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+
+cd /etc/sysconfig/network-scripts
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+CONFIG=$1
+source_config
+
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
+       exit
+fi
+
+if [ ! -x /sbin/brctl ]; then
+       nls "%s is missing. Can't continue." "/sbin/brctl"
+       exit 1
+fi
+
+. /etc/sysconfig/network
+
+# load bridge module
+is_module "bridge" && modprobe -s -k bridge
+
+# set all major variables
+setup_ip_param
+
+# set device down and forget all addresses
+for device in $BRIDGE_DEVS; do
+       ip link set ${device} down
+       ip addr flush dev ${device} 2>&1 | grep -v "Nothing to flush"
+done
+
+brctl addbr ${DEVICE}
+
+# add interfaces to bridge
+for device in $BRIDGE_DEVS; do
+       brctl addif ${DEVICE} ${device}
+       ip link set dev ${DEVICE} multicast ${MULTICAST} arp ${ARP}
+       ip link set ${device} up
+done
+
+
+# standard
+[ -n "$AGEING" ] && brctl setageing "$AGEING"
+[ -n "$GCINT" ] && brctl gcint "$GCINT"
+
+# spanning tree protocol
+if is_yes "$SPANNING_TREE"; then
+       brctl stp ${DEVICE} yes
+       [ -n "$BRIDGEPRIO" ] && brctl bridgeprio ${DEVICE} "$BRIDGEPRIO"
+       [ -n "$FD" ] && brctl fd ${DEVICE} "$FD"
+       [ -n "$HELLO" ] && brctl hello ${DEVICE} "$HELLO"
+       [ -n "$MAXAGE" ] && brctl maxage ${DEVICE} "$MAXAGE"
+       [ -n "$PATHCOST" -a -n "$PATHCOST_PORT" ] && brctl pathcost ${DEVICE} "$PATHCOST_PORT" "$PATHCOST"
+       [ -n "$PORTPRIO" -a -n "$PORTPRIO_PORT" ] && brctl portprio ${DEVICE} "$PORTPRIO_PORT" "$PORTPRIO"
+else
+       brctl stp ${DEVICE} no
+fi
+       
+ip link set dev ${DEVICE} multicast ${MULTICAST} arp ${ARP}
+if ! (ip link set dev ${DEVICE} up); then
+       nls "problems with setting bridge %s" "${DEVICE}"
+       exit 1
+fi
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 3e5342e51a65b8e2d948d2bd86c38c290ddaec80..1d4777949bdad6ccec1fd5124127076de19d08b5 100755 (executable)
@@ -1,42 +1,58 @@
 #!/bin/sh
 #
-#      $Id: ifup-ipx,v 1.9 2000/04/07 19:16:11 baggins Exp $
+#      $Id: ifup-ipx,v 1.9.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 # configures IPX on $1 if appropriate
 
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 if [ "$1" = "" ]; then
-       echo "usage: $0 <net-device>"
+       nls "usage: %s <device name>" "ifup-ipx" >&2
        exit 1
 fi
 
-if [ ! -x /usr/bin/ipx_interface ] ; then
-       # cannot configure IPX with non-existant utilities
+if is_no "$IPX"; then
        exit 0
 fi
 
-. /etc/sysconfig/network
-
-case $IPX in yes|true) ;; *) exit 0 ;; esac
+if [ ! -x /usr/bin/ipx_interface ] ; then
+       nls "%s is missing. Can't continue." "/usr/bin/ipx_interface"
+       exit 1
+fi
 
 cd /etc/sysconfig/network-scripts
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
 
 CONFIG=$1
 [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
 source_config
 
-[ -z $IPXFRAMETYPE ] && exit 0
+# set all major variables
+setup_ip_param
+
+# add ipx for all frame types
+for frametype in '802.2' '802.2TR' '802.3' 'EtherII' 'SNAP'; do
+       framename=$(echo $frametype | awk ' { gsub(/\./,"_"); print $0 } ')
+       case $(eval echo $(echo \$`echo IPXACTIVE_$framename`)) in
+            yes|true)
+              case $(eval echo $(echo \$`echo IPXPRIMARY_$framename`)) in
+                yes|true) primary="-p" ;;
+                *) primary= ;;
+              esac
+
+              ip link set $DEVICE up
+              /usr/bin/ipx_interface add $primary $DEVICE $frametype \
+                  $(eval echo $(echo \$`echo IPXNETNUM_$framename`))
+              ;;
+       esac
+done
 
-case $IPXPRIMARY in
-    yes|true) primary=-p ;;
-    *) primary= ;;
-esac
+exit 0
 
-ip link set $DEVICE up
-/usr/bin/ipx_interface add $DEVICE $primary $IPXFRAMETYPE $IPXNETWORK
 
-exit 0
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
 
diff --git a/sysconfig/network-scripts/ifup-lec b/sysconfig/network-scripts/ifup-lec
new file mode 100755 (executable)
index 0000000..fdacf70
--- /dev/null
@@ -0,0 +1,84 @@
+#!/bin/sh
+#
+#    ifup-lec - ATM LANE interfaces configuration script
+#    Copyright (C) 1999, 2000 Robert ¦laski <robin@atm.com.pl>
+#    Copyright (C) 2000 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: ifup-lec,v 1.1.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
+DEV=$1
+
+[ -z "$DEV" ] && {
+    nls "usage: %s <device name>" ifup-lec >&2
+    exit 1
+}
+
+if [ -r /etc/sysconfig/atm ]; then
+       . /etc/sysconfig/atm
+else
+       exit 0
+fi
+
+if is_no "$LANE"; then
+       exit 0
+fi
+
+if [ ! -x /sbin/zeppelin ]; then
+        nls "%s is missing. Can't continue." "/sbin/zeppelin"
+        exit 1
+fi
+               
+
+if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
+        CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
+else
+        CONFIG="$DEV"
+fi
+               
+source_config
+
+if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
+        exit
+fi
+
+# set all major variables
+setup_ip_param
+
+# check again in case of manuall interface starting
+atm_daemons_start
+
+INTERFACE=$(echo "$DEVICE" | awk ' { gsub(/^lec/,NIL); print $0 } ')
+
+zeppelin \
+       -n $VLAN_NAME \
+       -i $INTERFACE \
+       -l $INTERFACE \
+       -f $VLAN_FORESWITCH_NAME \
+       -2 -F syslog 2>/dev/null &
+       
+sleep 1
+
+echo "$!" > /var/run/zeppelin-$DEVICE.pid
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index e691d936b520ec39c572fb184eea4d550cd13a2f..565cf4bba074fbbd3320c508b58e9f27aeb57264 100755 (executable)
@@ -1,10 +1,12 @@
 #!/bin/sh
 #
-#      $Id: ifup-plip,v 1.10 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup-plip,v 1.10.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 cd /etc/sysconfig/network-scripts
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
 . /etc/sysconfig/network-scripts/.functions
 
 CONFIG=$1
@@ -14,16 +16,30 @@ if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
        exit
 fi
 
-ip -family inet addr add ${IPADDR}/32 peer ${REMIP} dev ${DEVICE}
-ip -family inet route add ${NETWORK}/${PREFIX} dev ${DEVICE}
+# set all major variables
+setup_ip_param
 
-. /etc/sysconfig/network
+if is_yes "$IPV4_NETWORKING"; then
+       if [ -n "$IP4ADDR" ]; then
+               ip -4 addr add ${IP4ADDR} peer ${REMIP} dev ${DEVICE}
+       fi
+fi
 
-if [ "${GATEWAY}" != "" ]; then
-       if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then
-               # set up default gateway
-               ip -family inet route add default via ${GATEWAY}
+if is_yes "$IPV6_NETWORKING"; then
+       if [ -n "$IP6ADDR" ]; then
+               ip -6 addr add ${IP6ADDR} dev ${DEVICE}
        fi
 fi
 
+ip link set dev ${DEVICE} up
+
+. /etc/sysconfig/network
+
+# IPv4/6 gateways and default routes
+setup_ip_gw_ro
+
 /etc/sysconfig/network-scripts/ifup-post $1
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 35e6b10e3f853cd03a6a23a1f1a7c90b58394385..de4e2637185cbc397dc3430c077e34c4783e33fd 100755 (executable)
@@ -1,10 +1,8 @@
 #!/bin/sh
 #
-#      $Id: ifup-post,v 1.21 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup-post,v 1.21.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 
-run_up() { :; }
-
 . /etc/rc.d/init.d/functions
 . /etc/sysconfig/network
 . /etc/sysconfig/network-scripts/.functions
@@ -13,44 +11,38 @@ need_hostname
 CONFIG=$1
 source_config
 
-# full device name as specified by user
-FULLDEVNAME="$DEVICE"
-# type of device for example "dummy" or "eth"
-DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
-# name of real device ie. eth0 when eth0,eth0:1,eth0:alias
-DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
+# set all major variables
+setup_ip_param
 
+# set REALDEVICE
 get_ppp_device_and_pid
 
-if echo "$FULLDEVNAME" | grep -q ':' ; then
-       ISALIAS=yes
-else
-       ISALIAS=no
-fi
-
+if [ -n "$QDISC" ]; then
 # Set the queuing discipline
 #    eg: sfq for better link sharing or teql0 for link equalizer
-if [ -n "$QDISC" ] ; then
        tc qdisc add dev "$REALDEVICE" root $QDISC
 fi
 
-/etc/sysconfig/network-scripts/ifup-routes ${CONFIG}
-
-if [ "$ISALIAS" = "no" ] ; then
-       /etc/sysconfig/network-scripts/ifup-aliases ${DEVICE}
-fi
+/etc/sysconfig/network-scripts/ifup-aliases ${DEVICE}
+/etc/sysconfig/network-scripts/ifup-routes ${DEVICE}
 
 # don't set hostname on ppp/slip connections
-if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
-       IPADDR=`ip -f inet addr show dev ${DEVICE} label ${FULLDEVNAME} | 
-               awk '/inet/ { print $2 }' |awk -F"/" '{ print $1 }'`
-       eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
+if [ -n "$NEEDHOSTNAME" -a "${DEVICETYPE}" != "ppp" -a "${DEVICETYPE}" != "slip" ]; then
+       IPADDR=$(ip -f inet addr show dev ${DEVICE} | 
+               awk '/inet/ { print $2 }' |awk -F"/" '{ print $1 }')
+       eval $(/bin/ipcalc --silent --hostname ${IPADDR}) && set_hostname $HOSTNAME
 fi
 
-# execute run_up() function (if available in device configuration file)
-[ "$ISALIAS" = "no" ] && run_up
+# run tleds software
+if [ "$TLEDS_DEV" = "$DEVICE" -a -x /usr/bin/tleds ]; then
+       /usr/bin/tleds -qc "$DEVICE"
+fi
 
 # Notify programs that have requested notification
 do_netreport
 
 exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 9eb188cbfdcc3840dc50e8163a413f3a0495fdbb..ca684f8b7fd6fd37a243038bf73696835d1d1b7b 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#      $Id: ifup-ppp,v 1.13 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup-ppp,v 1.13.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 # ifup-ppp script for pppd-2.3.5 (with persist & demand options) ver 0.2
 # Grzegorz Stanislawski <stangrze@open.net.pl>
@@ -25,19 +25,29 @@ CONFIG=$1
 . /etc/sysconfig/network-scripts/.functions
 
 source_config
+
+# set all major variables
+setup_ip_param
+
 [ -z "$HOLDOFF" ] && HOLDOFF=30
 
 if [ "$2" = "boot" ] && is_no "${ONBOOT}"; then
   exit
 fi
 [ -x /usr/sbin/pppd ] || {
-  echo "/usr/sbin/pppd does not exist or is not executable"
-  echo "ifup-ppp for $DEVICE exiting"
+  nls "/usr/sbin/pppd does not exist or is not executable"
+  nls "ifup-ppp for %s exiting" "$DEVICE"
     logger -p daemon.info -t ifup-ppp \
-    "/usr/sbin/pppd does not exist or is not executable for $DEVICE"
+    "$(nls "/usr/sbin/pppd does not exist or is not executable for %s" "$DEVICE")"
   exit 1
 }
 
+# modprobe ppp in case of kernel with devfs
+# (/dev/ppp is missing and ppp fails without this) --misiek
+if [ -c /dev/.devfsd ]; then
+       modprobe -s -k char-major-108
+fi
+
 opts="lock"
 if is_yes "${PERSIST}"; then
   if [ -z "${MAXFAIL}" ]; then 
@@ -60,17 +70,34 @@ elif [ "${ESCAPECHARS}" = no ] ; then
   opts="$opts asyncmap 00000000"
 fi
 if is_yes "${DEFROUTE}" = yes; then
+  # pppd will no longer delete an existing default route
+  # so we have to help it out a little here.
+  ip route del 0/0 > /dev/null 2>&1
   opts="$opts defaultroute"
 fi
+if is_yes "${PEERDNS}"; then
+  opts="$opts usepeerdns"
+fi
 if [ -n "${MRU}" ] ; then
   opts="$opts mru ${MRU}"
 fi
 if [ -n "${MTU}" ] ; then
   opts="$opts mtu ${MTU}"
 fi
-if [ -n "${IPADDR}${REMIP}" ] ; then
+if is_yes "$IPV4_NETWORKING" && [ -n "${IP4ADDR}${REMIP}" ] ; then
   # if either IP address is set, the following will work.
-  opts="$opts ${IPADDR}:${REMIP}"
+  opts="$opts ${IP4ADDR}:${REMIP}"
+fi
+if is_yes "$IPV6_NETWORKING" && is_yes "$IPV6_PPP"; then
+       if [ -n "${IP6ADDR}${REMIP6}" ] ; then
+         opts="$opts ipv6 ${IP6ADDR},${REMIP6}"
+       elif is_yes "$IPV6_CP_USEV4"; then
+         opts="$opts ipv6cp-use-ipaddr"
+       elif is_yes "$IPV6_CP_PERSISTENT"; then
+         opts="$opts ipv6cp-use-persistent"
+       fi
+else
+       opts="$opts noipv6"
 fi
 if [ -n "${PAPNAME}" ] ; then
   opts="$opts name ${PAPNAME}"
@@ -101,7 +128,7 @@ if [ -n "${CHATSCRIPT}"  ] ; then
   export $DATAFORCHAT
   /usr/sbin/pppd $opts $MODEMPORT $LINESPEED \
     connect 'eval /usr/sbin/chat $chatdbg $chatrpt \
-    `grep -v ^# ${CHATSCRIPT}`' \
+    $(grep -v ^# ${CHATSCRIPT})' \
     linkname "${DEVICE}" ipparam "${CONFIG}" \
     ${PPPOPTIONS}
 else
@@ -110,3 +137,7 @@ else
     ${PPPOPTIONS}
 fi
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 5f4d7a9b1fb22cd9f1f8899ce514d80943ba84ab..6f814f871665e0622722eccea1d66cb5d8cb99d5 100755 (executable)
@@ -1,11 +1,15 @@
 #!/bin/sh
 #
-#      $Id: ifup-routes,v 1.8 2000/04/21 17:47:49 jajcus Exp $
+#      $Id: ifup-routes,v 1.8.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 # adds static routes which go through device $DEVICE
 
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
 if [ "$1" = "" ]; then
-       echo "usage: $0 <net-device>"
+       nls "usage: %s <device name>" "ifup-routes" >&2
        exit 1
 fi
 
@@ -14,15 +18,30 @@ if [ ! -f /etc/sysconfig/static-routes ]; then
 fi
 
 cd /etc/sysconfig/network-scripts
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
+
 CONFIG=$1
 source_config
 
+# set all major variables
+setup_ip_param
+
 get_ppp_device_and_pid
 
 # note the trailing white space character in the grep gets rid of aliases
 grep "^$DEVICE[[:blank:]]" /etc/sysconfig/static-routes | while read device args; do
+       if (echo $args | grep -q ":") then
+               if is_no "$IPV6_NETWORKING"; then
+                       continue
+               fi
+       else
+               if is_no "$IPV4_NETWORKING"; then
+                       continue
+               fi
+       fi
        /sbin/ip route add $args dev $REALDEVICE
 done
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 5bf8457760f00d9299d8b6ffd93f886b4736185a..3df40f6480f8cc3edaff2fa954e3f1bf0a599222 100755 (executable)
@@ -1,11 +1,15 @@
 #!/bin/sh
 #
-#      $Id: ifup-sl,v 1.16 2000/06/12 08:38:15 waszi Exp $
+#      $Id: ifup-sl,v 1.16.2.1 2000/10/18 20:10:55 misiek Exp $
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
 # ifup-post can't be done for slip :-( Solution: use PPP
 
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
+
 # become a daemon in case we have to persist.
 if [ "$1" != daemon ] ; then
   # disconnect stdin, out, err to disassociate from controlling tty
@@ -15,9 +19,6 @@ if [ "$1" != daemon ] ; then
 fi
 shift
 
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
-
 CONFIG=$1
 source_config
 
@@ -25,12 +26,15 @@ if [ "foo$2" = "fooboot" ] && is_no ${ONBOOT}; then
   exit
 fi
 
+# set all major variables
+setup_ip_param
+
 if [ -z "$RETRYTIMEOUT" ]; then
   RETRYTIMEOUT=30
 fi
 
 # Try to load slip module
-if [ "`ls -R /lib/modules/\`uname -r\`/ | grep slip.o`" != "" ]; then
+if is_module "slip"; then
        /sbin/modprobe -s -k slip
 fi
 
@@ -39,7 +43,7 @@ if is_no "$DIRECT_CONNECT"; then
 
 [ -x /usr/sbin/dip ] || {
   nls "/usr/sbin/dip does not exist or is not executable"
-  nls "ifup-sl for $DEVICE exiting"
+  nls "ifup-sl for %s exiting" "$DEVICE"
   logger -p daemon.info -t ifup-sl \
     "`nls '/usr/sbin/dip does not exist or is not executable for'` $DEVICE"
   exit 1
@@ -50,17 +54,17 @@ DIPSCRIPT=/etc/sysconfig/interfaces/data/dip-$DEVNAME
   DIPSCRIPT=/etc/sysconfig/interfaces/data/dip-$PARENTDEVNAME
 }
 [ -f $DIPSCRIPT ] || {
-  echo "/etc/sysconfig/interfaces/data/dip-$DEVICE `nls 'does not exist'`"
+  echo "/etc/sysconfig/interfaces/data/dip-$DEVICE $(nls 'does not exist')"
   echo "ifup-sl for $DEVICE exiting"
   logger -p daemon.info -t ifup-sl \
-    "/etc/sysconfig/interfaces/data/dip-$DEVICE `nls 'does not exist for'` $DEVICE"
+    "/etc/sysconfig/interfaces/data/dip-$DEVICE $(nls 'does not exist for') $DEVICE"
   exit 1
 }
 
 while : ; do
   echo > /var/run/sl-$DEVICE.dev
   (logger -p daemon.info -t ifup-sl \
-    "`nls 'dip started for'` $DEVICE `nls 'on'` $MODEMPORT `nls 'at'` $LINESPEED" &)&
+    "$(nls 'dip started for %s on %s at %s' "$DEVICE" "$MODEMPORT" "$LINESPEED")" &)&
   doexec /usr/sbin/dip dip-$DEVICE $DIPSCRIPT
   if is_no "$PERSIST" || [ ! -f /var/run/sl-$DEVICE.dev ] ; then
     exit 0
@@ -81,26 +85,43 @@ else
 [ -z "$PROTOCOL" ] && PROTOCOL=slip
 
 [ -x /sbin/slattach ] || {
-       nls "/sbin/slattach does not exist or is not executable"
-        echo "ifup-sl - $DEVICE `nls exiting`"
+       nls "%s is missing. Can't continue." "/sbin/slattach"
+        echo "ifup-sl - $DEVICE $(nls exiting)"
         logger -p daemon.info -t ifup-sl \
-        "`nls '/sbin/slattach does not exist or is not executable for'` $DEVICE"
+        "$(nls '/sbin/slattach does not exist or is not executable for %s' "$DEVICE")"
         exit 1
 }
 
         echo > /var/run/sl-$DEVICE.dev
         (logger -p daemon.info -t ifup-sl \
-        "`nls 'slattach started for'` $DEVICE `nls on` $MODEMPORT `nls at` $LINESPEED" &)&
+        "$(nls 'slattach started for %s on %s at %s' "$DEVICE" "$MODEMPORT" "$LINESPEED")" &)&
 
          slattach -p $PROTOCOL -s $LINESPEED $MODEMPORT &
          usleep 1500
+        
+        if is_yes "$IPV4_NETWORKING"; then
+               if [ -n "$IP4ADDR" -a -n "$REMIP" ]; then
+                       # Peer is only for IPv4
+                       ip -4 addr add $IP4ADDR peer $REMIP dev $DEVICE
+               fi
+        fi
+
+        if is_yes "$IPV6_NETWORKING"; then
+                if [ -n "$IP6ADDR" ]; then
+                        ip -6 addr add $IP6ADDR dev $DEVICE
+                fi
+        fi
+        
         ip link set $DEVICE mtu $MTU up
-        ip -family inet addr add $IPADDR peer $REMIP dev $DEVICE
 
-        # Set defaultroute
-        if is_yes "$DEFROUTE"; then
-               ip -family inet route add default dev $DEVICE
-         fi
+        # IPv4/6 gateways and default routes
+        setup_ip_gw_ro
+               
+        /etc/sysconfig/network-scripts/ifup-post $1
 
 fi
 
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
index 8a6af9dbddb613f6afaa4ada94aab95c1e33357f..ed0c35d92b2cd63f559d5151721c4e04685890c3 100755 (executable)
@@ -1,24 +1,39 @@
 #!/bin/sh
 #
-#      $Id: tnldown,v 1.16 2000/07/28 15:03:10 zagrodzki Exp $
+#    tnldown - tunnel configuration script
+#    Copyright (C) 1999, 2000  Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
-# Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
 #
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: tnldown,v 1.16.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
 
 DEV=$1
 
 [ -z "$DEV" ] && {
-    echo "usage: tnlup <device name>" >&2
+    nls "usage: %s <device name>" "tnldown" >&2
     exit 1
 }
 
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
-
-TNLCONFIGS="`ls /etc/sysconfig/interfaces/tnlcfg-*|egrep -v '~$'`"
-TNLCONFIGS="`egrep -L '^#!' $TNLCONFIGS`"
-CONFIG="`egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS`"
+TNLCONFIGS=$(ls /etc/sysconfig/interfaces/tnlcfg-*|egrep -v '~$')
+TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
+CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
 
 if [ -z "$CONFIG" ]; then
     CONFIG="$DEV"
@@ -27,23 +42,43 @@ fi
 if false; then
 [ -f "/etc/sysconfig/interfaces/$CONFIG" ] || CONFIG=tnlcfg-$CONFIG
 [ -f "/etc/sysconfig/interfaces/$CONFIG" ] || {
-    echo "usage: tnlup <device name>" >&2
+    echo "usage: tnldown <device name>" >&2
     exit 1
 }
 fi
 
 source_config
 
-is_no "${IPV6_TUNNELCONFIG}" && [ "${MODE}" = "sit" ] && exit 0
-is_no "${IPX}" && [ "${MODE}" = "ipxip" ] && exit 0
-is_no "${IPX}" && [ "${MODE}" = "ipipx" ] && exit 0
+case "${MODE}" in
+        sit|four)
+                is_no "${IPV6_NETWORKING}" && exit 0
+                is_no "${IPV6_TUNNELCONFIG}" && exit 0
+               ;;
+        ipip)
+                is_no "${IPV4_NETWORKING}" && exit 0
+                ;;
+        gre)
+                is_no "${IPV4_NETWORKING}" && exit 0
+                ;;
+esac
 
-if [ "${MODE}" = "ipip" ] || [ "${MODE}" = "sit" ] || [ "${MODE}" = "gre" ]; then
+RESULT=0
 
-       ip tunnel del ${DEVICE}
+case "${MODE}" in
+       ipip|sit|gre)
+               ip link set ${DEVICE} down
+               ip tunnel del ${DEVICE}
+               RESULT=$?
+               ;;
+       four)
+               ip link set ${DEVICE} down
+               fourcfg del ${DEVICE}
+               RESULT=$?
+               ;;
+esac
 
-elif [ "${MODE}" = "ipxip" ] || [ "${MODE}" = "ipipx" ]; then
+exit $RESULT
 
-echo "obs³uga ipxip jeszcze nie zrobiona"
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
 
-fi
index 47e7508937dd590c2b0af07f9af4e9b589fa999f..0ccbdcf077d22cb5e74ab9cdb72c4e3ba9687bbb 100755 (executable)
@@ -1,24 +1,39 @@
 #!/bin/sh
 #
-#      $Id: tnlup,v 1.19 2000/07/28 15:03:10 zagrodzki Exp $
+#    tnlup - tunnel configuration script
+#    Copyright (C) 1999, 2000  Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
 #
-# Author: Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
+#    This program is free software; you can redistribute it and/or modify
+#    it under the terms of the GNU General Public License as published by
+#    the Free Software Foundation; either version 2 of the License, or
+#    (at your option) any later version.
 #
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU General Public License for more details.
+#
+#    You should have received a copy of the GNU General Public License
+#    along with this program; if not, write to the Free Software
+#    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#    $Id: tnlup,v 1.19.2.1 2000/10/18 20:10:55 misiek Exp $
+#
+
+. /etc/sysconfig/network
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/.functions
 
 DEV=$1
 
 [ -z "$DEV" ] && {
-    echo "usage: tnlup <device name>" >&2
+    nls "usage: %s <device name>" "tnlup" >&2
     exit 1
 }
 
-. /etc/sysconfig/network
-. /etc/rc.d/init.d/functions
-. /etc/sysconfig/network-scripts/.functions
-
-TNLCONFIGS="`ls /etc/sysconfig/interfaces/tnlcfg-*|egrep -v '~$'`"
-TNLCONFIGS="`egrep -L '^#!' $TNLCONFIGS`"
-CONFIG="`egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS`"
+TNLCONFIGS=$(ls /etc/sysconfig/interfaces/tnlcfg-*|egrep -v '~$')
+TNLCONFIGS=$(egrep -L '^#!' $TNLCONFIGS)
+CONFIG=$(egrep -l "^DEVICE=[\"\']*$DEV[\"\']*\$" $TNLCONFIGS)
 
 if [ -z "$CONFIG" ]; then
     CONFIG="$DEV"
@@ -38,21 +53,31 @@ if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
         exit
 fi
 
-is_no "${IPV6_TUNNELCONFIG}" && [ "${MODE}" = "sit" ] && exit 0
-is_no "${IPX}" && [ "${MODE}" = "ipxip" ] && exit 0
-is_no "${IPX}" && [ "${MODE}" = "ipipx" ] && exit 0
-
-if [ "${MODE}" = "gre" -a "`ls -R /lib/modules/\`uname -r\`/ | grep ip_gre.o`" != "" ]; then
-       modprobe -s -k ip_gre
-elif [ "${MODE}" = "ipip" -a "`ls -R /lib/modules/\`uname -r\`/ | grep ipip.o`" != "" ]; then
-       modprobe -s -k ipip
-fi
-
+case "${MODE}" in
+       sit|four)
+               is_no "${IPV6_NETWORKING}" && exit 0
+               is_no "${IPV6_TUNNELCONFIG}" && exit 0
+               [ "${MODE}" = "four" -a is_module "fourtun" ] && modprobe -s -k fourtun
+               ;;
+       ipip)
+               is_no "${IPV4_NETWORKING}" && exit 0
+               is_module "ipip" && modprobe -s -k ipip
+               ;;
+       gre)
+               is_no "${IPV4_NETWORKING}" && exit 0
+               is_module "ip_gre" && modprobe -s -k ip_gre
+               ;;
+esac
+
+RESULT=0
 [ -z "${LOCALADDR}" ] && LOCALADDR=any
 [ -z "${REMOTEADDR}" ] && REMOTEADDR=any
 [ -n "${TTL}" ] && TTL="ttl ${TTL}"
 [ -n "${TOS}" ] && TOS="tos ${TOS}"
 [ -n "${BIND_DEV}" ] && BIND_DEV="dev ${BIND_DEV}"
+[ -n "${PRIORITY}" ] && PRIORITY="priority ${PRIORITY}"
+[ -n "${HOPLIMIT}" ] && HOPLIMIT="hoplimit ${HOPLIMIT}"
+[ -n "${ENCAPLIMIT}" ] && ENCAPLIMIT="encaplimit ${ENCAPLIMIT}"
 
 if is_yes "${SEQ}"; then
        SEQ=seq
@@ -68,12 +93,9 @@ else
         is_yes "${ICSUM}" && CSUM="${SEQ} ocsum"
 fi
 
-is_yes "${ISEQ}" && ISEQ=iseq
-is_yes "${ISEQ}" && ISEQ=iseq
-is_yes "${ISEQ}" && ISEQ=iseq
 is_yes "${ISEQ}" && ISEQ=iseq
 
-[ "${TTL}" != "0" -a "${TTL}" != "inherit" ] && PMTUDISC=yes
+[ -z "${PMTUDISC}" -a "${TTL}" != "0" -a "${TTL}" != "inherit" ] && PMTUDISC=yes
 
 if is_yes "${PMTUDISC}"; then
        PMTUDISC=pmtudisc
@@ -86,16 +108,23 @@ IKEY=""
 OKEY=""
 fi
 
-if [ "${MODE}" = "ipip" -o "${MODE}" = "sit" ]; then
-       
-       ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV}
+case "${MODE}" in
+       ipip|sit)
+               ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV}
+               RESULT=$?
+               ;;
+       gre)
+               ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV} ${CSUM} ${ISEQ} ${KEY} ${IKEY} ${OKEY}
+               RESULT=$?
+               ;;
+       fourtun)
+               fourcfg add ${DEVICE} saddr ${LOCALADDR} daddr ${REMOTEADDR} ${PRIORITY} ${HOPLIMIT} ${ENCAPLIMIT}
+               RESULT=$?
+               ;;
+esac
+
+exit $RESULT
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
 
-elif [ "${MODE}" = "gre" ]; then
-
-       ip tunnel add ${DEVICE} mode ${MODE} local ${LOCALADDR} remote ${REMOTEADDR} ${TTL} ${TOS} ${PMTUDISC} ${BIND_DEV} ${CSUM} ${ISEQ} ${KEY} ${IKEY} ${OKEY}
-
-elif [ "${MODE}" = "ipxip" -o "${MODE}" = "ipipx" ]; then
-
-echo "obs³uga ipxip jeszcze nie zrobiona"
-
-fi
index 902545a5383f3cbc059db546fd0ebcd0c0b0c9f8..1865bbae8d5eb7f09f8da81c76e166470f149fa9 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: system,v 1.17 2000/07/13 14:51:46 baggins Exp $
+# $Id: system,v 1.17.2.1 2000/10/18 20:10:51 misiek Exp $
 
 # Do you want colorized starting scripts ?
 COLOR_INIT=yes
@@ -55,23 +55,9 @@ RUN_LDCONFIG=no
 # Mount /dev (Device Filesystem)
 MOUNT_DEVFS=no
 
-# Start DevFS daemon to preserve compatibility with old "style" device names
-RUN_DEVFSD=no
-# Adjust number of inodes and file handles available in the system.
-# If you have a havily loaded system and kernel complains about
-# file/inode limit reached in VFS, increase this 2x. The default
-# value is 4096 (file) and 8192 (inode). The inode number should be
-# always 2-3 times the file number. For most systems this should not
-# be changed
-#VFS_FILE_MAX=4096
-#VFS_INODE_MAX=8192
-
 # Set to anything other than 'no' to allow hotkey interactive startup...
 PROMPT=yes
 
-# Setting this to something other than 'no' will turn on magic sysrq keys
-MAGIC_SYSRQ=yes
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
 
-# Setting this to something other than 'no' will turn on stop-a (Sparc only)
-STOP_A=no
index 512cd16eee8f719fda959b424df54885f90e006a..96989ddccfd728606debef5fcba7064c41a33832 100644 (file)
@@ -15,3 +15,7 @@ ZONE_INFO_AREA="Europe"
 # Name of the time zone 
 # for your system.
 TIME_ZONE="Warsaw"
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=4
+
diff --git a/sysctl.conf b/sysctl.conf
new file mode 100644 (file)
index 0000000..345e220
--- /dev/null
@@ -0,0 +1,34 @@
+### IPV4 NETWORKING
+# Disables IPv4 packet forwarding
+net.ipv4.ip_forward = 0
+# Disables IPv6 packet forwarding
+net.ipv6.conf.all.forwarding = 0
+# Accept ICMP redirect messages (suggested 1 for hosts and 0 for routers)
+# net.ipv4.conf.all.accept_redirects = 1
+# Accept source routed packages
+# net.ipv4.conf.all.accept_source_route = 1
+# Enables source route verification
+net.ipv4.conf.all.rp_filter = 1
+# Disables automatic defragmentation (needed for masquerading, LVS)
+net.ipv4.ip_always_defrag = 0
+# Enable the magic-sysrq key
+kernel.sysrq = 1
+# Disable tcp_timestamp
+net.ipv4.tcp_timestamp = 0
+# Enable tcp_syncookies
+net.ipv4.tcp_syncookies= 1
+# Dynamic IP patch (0 == disable)
+# sys.net.ipv4.ip_dynaddr = 7
+# Default local ports range
+sys.net.ipv4.ip_local_port_range = 1024 4999
+
+### IPV6 NETWORKING
+# Disables IPv6 packet forwarding
+net.ipv6.conf.all.forwarding = 0
+
+### OTHER SETTINGS
+# Maximal number of system files
+# sys.fs.file-max = 
+# Maximal number of system inodes
+# sys.fs.inode-max = 
+
This page took 0.319201 seconds and 4 git commands to generate.