]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- removed "scripts" method of executing external programs after uping
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 27 Mar 2000 16:07:52 +0000 (16:07 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Mon, 27 Mar 2000 16:07:52 +0000 (16:07 +0000)
  or downing device (almost nobody didn't know about it 8-)
- added new method which is using run_up() and run_down() functions
  defined in device configuration file (ifcfg*)
- fixed problem with displaing garbage instead of formated output
- removed execution of random start (this should be started in standard
  init.d way)
- set ld.so.cache if doesn't exist, too
- use new (rh) style for date variables

svn-id: @697

INSTALL
NEWS
po/pl.po
rc-scripts.spec.in
rc.d/init.d/functions.network
rc.d/rc
rc.d/rc.sysinit
src/Makefile.am
sysconfig/interfaces/ifcfg-description
sysconfig/network-scripts/ifdown-post
sysconfig/network-scripts/ifup-post

diff --git a/INSTALL b/INSTALL
index ad578a4e7fee7a82eb45849c2e243a2bb741d3bb..76f47a425e9d46e5143cca05aa75a796c096675e 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,6 @@
-       $Id: INSTALL,v 1.3 1999/07/31 11:24:17 misiek Exp $
+       $Id: INSTALL,v 1.4 2000/03/27 16:07:48 misiek Exp $
+
+               !! First read README file !!
 
 Basic Installation
 ==================
diff --git a/NEWS b/NEWS
index 19561b23d77be1b9b8ffc68f539052fbb4595b43..8b6d046b2b3509dacd0cb4ba07acafa5c0144189 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,11 @@
 
-       $Id: NEWS,v 1.5 2000/01/31 14:29:53 misiek Exp $
+       $Id: NEWS,v 1.6 2000/03/27 16:07:48 misiek Exp $
 
 - National Language Support; currently only english and polish
   supported. Translators needed.
+  
 - PREFIX support (instead of NETMASK) - CIDR specification.
+
+- LDAP support (for interfaces database).
+
+- Full IPv6 support (including PPP).
index 5583017bad9a0775c7577af50b9d9d37143869c5..3c6ac32c9b992b4da05e3d72a3f46d4254eea64b 100644 (file)
--- a/po/pl.po
+++ b/po/pl.po
@@ -1,7 +1,7 @@
 # Polish translation of rc-scripts.
-# Copyright (C) 1999 Free Software Foundation, Inc.
-# Arkadiusz Miskiewicz <misiek@pld.org.pl>, 1999.
-# $Id: pl.po,v 1.25 2000/03/24 08:48:54 misiek Exp $
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+# Arkadiusz Miskiewicz <misiek@pld.org.pl>, 1999, 2000.
+# $Id: pl.po,v 1.26 2000/03/27 16:07:49 misiek Exp $
 #
 msgid ""
 msgstr ""
@@ -121,8 +121,8 @@ msgid "Enabling dynamic IP patch"
 msgstr ""
 
 #: ../rc.d/rc.sysinit:453
-msgid "Sending val. %s to /proc/sys/kernel/panic"
-msgstr "Przesylanie wartosci %s do /proc/sys/kernel/panic"
+msgid "Setting %s seconds for kernel reboot after panic."
+msgstr "Restartuj system po %s sekundach od zawieszenia siê j±dra."
 
 #: ../rc.d/init.d/functions:340 ../rc.d/init.d/functions:348
 msgid "%s (pid %s) is running...\n"
index 87f836dcc299ab268c8e782f21b026773fa17d40..809f74f1160fac3f133431b7e2e53ab47500e9a6 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: rc-scripts.spec.in,v 1.45 2000/03/22 22:00:06 wiget Exp $
+# $Id: rc-scripts.spec.in,v 1.46 2000/03/27 16:07:49 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
@@ -11,7 +11,7 @@ Copyright:    GPL
 Group:         Base
 Group(pl):     Bazowe  
 Source:                %{name}-%{version}.tar.gz
-URL:           http://cvs.pld.org.pl/index.cgi/rc-scripts/
+URL:           http://cvsweb.pld.org.pl/index.cgi/rc-scripts/
 Vendor:                PLD rc-scripts Team <pld-rc-scripts@pld.org.pl>
 BuildRequires: popt-devel
 BuildRequires: glib-devel
@@ -194,6 +194,7 @@ fi
 %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/timezone
 %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
 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/sysconfig/system
 
 %{_mandir}/man1/*
index a8952bc89f496e09a54d6dfd609b803e163d00b0..cd026188e75d4b781177555a03ae95320f02d439 100755 (executable)
@@ -1,5 +1,5 @@
 #
-# $Id: functions.network,v 1.38 2000/03/22 01:08:00 kloczek Exp $
+# $Id: functions.network,v 1.39 2000/03/27 16:07:50 misiek Exp $
 # vi:syntax=sh
 # This is not a shell script; it provides functions to network scripts
 # that source it.
@@ -125,27 +125,7 @@ fi
 }
 
 # PLD/Linux network functions
-# (C) 1999 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
-#
-
-# same as shell script run-parts from *cron* daemons
-rparts()
-{
-if [ -d "$1" -a "$ISALIAS" = "no" ]; then
-       if [ "$2" = "start" ]; then
-               FLIST="`ls $1/*.up | xargs 2>/dev/null`"
-       else if [ "$2" = "stop" ]; then
-               FLIST="`ls $1/*.down | xargs 2>/dev/null`"
-            fi
-       fi
-       for i in $FLIST ; do
-               [ -d $i ] && continue
-               if [ -x $i ]; then
-                       $i
-               fi
-       done
-fi
-}
+# 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"
 
diff --git a/rc.d/rc b/rc.d/rc
index e0da932a826802616db34e43b7e5dc02b9a264c3..176c46a5c4654ff113cb790a44db979bea616da7 100755 (executable)
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -5,7 +5,7 @@
 #               responsible for the very first setup of basic
 #               things, such as setting the hostname.
 #
-# $Id: rc,v 1.18 2000/03/24 08:48:55 misiek Exp $
+# $Id: rc,v 1.19 2000/03/27 16:07:50 misiek Exp $
 #
 # Original Author:       
 #               Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
@@ -56,7 +56,7 @@ export runlevel previous
 # 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
+       [ -x /usr/bin/chvt ] && /usr/bin/chvt 1 && echo > /dev/console
        exec 0<> /dev/console 1>&0 2>&0
 else
 # if previous runlevel = current runlevel do nothing
index 0cb0a3b27834d32441c932921f632e65a0354c0d..971c9c9fca6cd632d189acfa3444fdc34634b1f3 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 # /etc/rc.d/rc.sysinit - run once at boot time
-# $Id: rc.sysinit,v 1.52 2000/03/24 08:39:33 waszi Exp $
+# $Id: rc.sysinit,v 1.53 2000/03/27 16:07:50 misiek Exp $
 #
 # Taken in part from Miquel van Smoorenburg's bcheckrc.
 # Changes:      Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
@@ -59,7 +59,10 @@ if [ "$PROMPT" != "no" ]; then
        echo
        sleep 1
 fi
-   
+
+# we need /proc mounted before everything
+mount -n -t proc /proc /proc
+  
 # set up devfsd
 if [ -x /sbin/devfsd -a -f /etc/devfsd.conf ]; then
        if [ "$RUN_DEVFSD" = "yes" ]; then
@@ -81,9 +84,53 @@ if [ -f /proc/sys/kernel/stop-a -a "$STOP_A" = "no" ]; then
        echo "0" > /proc/sys/kernel/stop-a
        run_cmd "Turning off Stop-A/Break-A" /bin/true
 fi
-                               
-# we need /proc mounted before starting fsck
-mount -n -t proc /proc /proc
+
+# Set the system clock.
+ARC=0
+SRM=0
+UTC=0
+
+if [ -f /etc/sysconfig/clock ]; then
+   . /etc/sysconfig/clock
+
+   # convert old style clock config to new values
+   if [ "${CLOCKMODE}" = "GMT" ]; then
+      UTC=true
+   elif [ "${CLOCKMODE}" = "ARC" ]; then
+      ARC=true
+   fi
+fi
+
+if grep "system serial" /proc/cpuinfo | grep -q MILO ; then
+   ARC=true
+fi
+
+CLOCKDEF=""
+CLOCKFLAGS="--hctosys"
+
+case "$UTC" in
+   yes|true)
+    CLOCKFLAGS="$CLOCKFLAGS -u";
+    CLOCKDEF="$CLOCKDEF (utc)";
+  ;;
+esac
+
+case "$ARC" in
+     yes|true)
+        CLOCKFLAGS="$CLOCKFLAGS -A";
+        CLOCKDEF="$CLOCKDEF (arc)";
+     ;;
+esac
+case "$SRM" in
+     yes|true)
+        CLOCKFLAGS="$CLOCKFLAGS -S";
+        CLOCKDEF="$CLOCKDEF (srm)";
+     ;;
+esac
+
+if (run_cmd "Setting clock $CLOCKDEF" /sbin/hwclock $CLOCKFLAGS); then
+       show "Today's date: `LC_CTYPE=C date`"; ok
+fi
 
 # Start up swapping.
 run_cmd "`nls "Activating swap partitions"`" swapon -a
@@ -341,10 +388,20 @@ if [ -x /sbin/quotaon ]; then
        run_cmd "Turning on quotas for local filesystems" /sbin/quotaon -a
 fi
 
-{
+# Initialize the serial ports.
+if [ -f /etc/rc.d/rc.serial ]; then
+       . /etc/rc.d/rc.serial
+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 deltext; ok; else deltext; fail; fi
+fi
+
 # Clean out /etc & /var/{run/*,log/{b,w}tmpx}}.
 rm -f /etc/mtab~ /fastboot /fsckoptions /forcefsck
 
+{
 # Clean up utmp/wtmp
 :>/var/run/utmp
 touch /var/log/wtmp
@@ -382,63 +439,9 @@ rm -f /tmp/.X*-lock
 # Delete Postgres sockets
 rm -f /tmp/.s.PGSQL.*
 
-# Set the system clock.
-show "Setting clock"; busy
-
-ARC=0
-UTC=0
-if [ -f /etc/sysconfig/clock ]; then
-       . /etc/sysconfig/clock
-
-       # convert old style clock config to new values
-       if [ "${CLOCKMODE}" = "GMT" ]; then
-               UTC=true
-       elif [ "${CLOCKMODE}" = "ARC" ]; then
-           ARC=true
-       fi
-fi
-
-if [ -x /sbin/hwclock ]; then
-       CLOCKFLAGS="--hctosys"
-       CLOCK=/sbin/hwclock
-else
-       CLOCKFLAGS="-a"
-       CLOCK=/sbin/clock
-fi
-
-case "$UTC" in
-  yes|true)
-       CLOCKFLAGS="$CLOCKFLAGS -u";
-#      echo -n " (utc)"
-       ;;
-esac
-
-case "$ARC" in
-  yes|true)
-       CLOCKFLAGS="$CLOCKFLAGS -A";
-#      echo -n " (arc)"
-       ;;
-esac
-
-#echo -n ": "
-if ($CLOCK $CLOCKFLAGS); then deltext; ok; else deltext; fail; fi
-
-show "`nls "Date set to"` `date`"; ok
-
 # Right, now turn on swap in case we swap to files.
 swapon -a >/dev/null 2>&1
 run_cmd "Enabling swap space" /bin/true
-#show "Enabling swap space"; busy
-#if [ "`LANG=C swapon -a 2>&1 | grep -v "busy"`" = "" ]; then
-#      deltext; ok
-#else
-#      deltext; fail
-#fi
-
-# Initialize the serial ports.
-if [ -f /etc/rc.d/rc.serial ]; then
-       . /etc/rc.d/rc.serial
-fi
 
 # If a SCSI tape has been detected, load the st module unconditionally
 # since many SCSI tapes don't deal well with st being loaded and unloaded
@@ -454,11 +457,6 @@ fi
 # there could be a new kernel version.  remove old psdevtab database
 rm -f /etc/psdevtab
 
-if [ -f /proc/sys/kernel/panic -a "$PANIC_REBOOT_TIME" -gt "0" ]; then
-show "`nls "Sending val. %s to /proc/sys/kernel/panic" "$PANIC_REBOOT_TIME"`"; busy
-if (echo $PANIC_REBOOT_TIME > /proc/sys/kernel/panic); then deltext; ok; else deltext; fail; fi
-fi
-
 # 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
@@ -489,6 +487,3 @@ if [ "$PROMPT" != "no" ]; then
    /sbin/getkey i && touch /var/run/confirm
 fi
 wait
-   
-# Feed entropy into the entropy pool
-/etc/rc.d/init.d/random start
index 5be648d3c5936ed91529f7df078cf82a439ee100..91c40d091f77543571fa194943456be4b3fd7d11 100644 (file)
@@ -1,5 +1,8 @@
 @SET_MAKE@
 
+sysconf_DATA = \
+       initlog.conf
+
 bin_PROGRAMS = \
        doexec \
        ipcalc \
index 39bc964f080583ab8f61de7d184eba71d69ea385..37529642cfb9cbbfc7a18e3c28109f185c02ff3b 100644 (file)
@@ -1,4 +1,4 @@
-#      $Id: ifcfg-description,v 1.2 1999/09/13 13:26:43 misiek Exp $
+#      $Id: ifcfg-description,v 1.3 2000/03/27 16:07:51 misiek Exp $
 PROTOCOL={ip|ipx} (default ip)
 
 if     PROTOCOL=ip; then
@@ -61,3 +61,15 @@ elif DEVICE=ppp* || DEVICE=slip* ; then
        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 !"
+}
+
index f30545ac3c235c0a5adc48d5f6b39af38ac16482..11b0c8ec1f5c050823f4696a4f167adc4aa60525 100755 (executable)
@@ -1,10 +1,12 @@
 #!/bin/sh
 #
-#      $Id: ifdown-post,v 1.9 2000/03/08 16:30:14 misiek Exp $
+#      $Id: ifdown-post,v 1.10 2000/03/27 16:07:52 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
@@ -25,9 +27,8 @@ else
         ISALIAS=no
 fi
 
-# run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/
-# named somename.up
-rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" stop
+# execute run_up() function (if available in device configuration file)
+[ "$ISALIAS" = "no" ] && run_down
 
 # Notify programs that have requested notification
 do_netreport
index 705fce7b1842c68fe4d23df1c4e6217ac2e3779e..401a4cc640fe5927029fabdad32d6011f24aefb9 100755 (executable)
@@ -1,8 +1,10 @@
 #!/bin/sh
 #
-#      $Id: ifup-post,v 1.16 2000/03/08 16:30:14 misiek Exp $
+#      $Id: ifup-post,v 1.17 2000/03/27 16:07:52 misiek Exp $
 #
 
+run_up() { :; }
+
 . /etc/sysconfig/network
 . /etc/sysconfig/network-scripts/.functions
 
@@ -36,9 +38,8 @@ if [ -n "$NEEDHOSTNAME" -a "${DEVICE}" != lo -a "${DEVICETYPE}" != "ppp" -a "${D
        eval `/bin/ipcalc --silent --hostname ${IPADDR}` && set_hostname $HOSTNAME
 fi
 
-# run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/
-# named somename.up
-rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" start
+# execute run_up() function (if available in device configuration file)
+[ "$ISALIAS" = "no" ] && run_up
 
 # Notify programs that have requested notification
 do_netreport
This page took 0.144469 seconds and 4 git commands to generate.