]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- started merging TOTALNEW
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 19 Mar 2002 18:19:57 +0000 (18:19 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 19 Mar 2002 18:19:57 +0000 (18:19 +0000)
svn-id: @1002

20 files changed:
Makefile.am
README
autogen.sh
configure.in
hwprofile [new file with mode: 0755]
isapnp/.cvsignore [new file with mode: 0644]
isapnp/Makefile.am [new file with mode: 0644]
isapnp/isapnp-kernel.conf [new file with mode: 0644]
ppp/Makefile.am
ppp/auth-down [new file with mode: 0755]
ppp/auth-up [new file with mode: 0755]
ppp/ip-down
ppp/ip-up
ppp/ipx-down [new file with mode: 0755]
ppp/ipx-up [new file with mode: 0755]
service [new file with mode: 0755]
sysconfig/Makefile.am
sysconfig/hwprof [new file with mode: 0644]
sysconfig/hwprofiles/.cvsignore [new file with mode: 0644]
sysconfig/hwprofiles/Makefile.am [new file with mode: 0644]

index a26c7bfaff17eba374cc341f931f93d593b0a643..2de113ec9c974b60002b1b603113faeeade59b3a 100644 (file)
@@ -1,8 +1,8 @@
 #
-#      $Id: Makefile.am,v 1.7 2001/05/15 16:03:33 baggins Exp $
+#      $Id: Makefile.am,v 1.8 2002/03/19 18:17:58 misiek Exp $
 #
 
-SUBDIRS = src ppp sysconfig rc.d doc po
+SUBDIRS = src ppp isapnp sysconfig rc.d doc po
 
 sysconf_DATA = \
        adjtime \
@@ -15,9 +15,12 @@ profiledir = @sysconfdir@/profile.d
 profile_DATA = \
        lang.sh \
        lang.csh
-       
+
 bin_SCRIPTS = run-parts
-sbin_SCRIPTS = setsysfont
+sbin_SCRIPTS = \
+       setsysfont \
+       hwprofile \
+       service
 
 EXTRA_DIST = \
        $(sysconf_DATA) \
diff --git a/README b/README
index 9a7db2768e86430ac5e1e85a48fbca23c06d4659..42ebb7c0e6dec45ef9984c1e6c5406e9ef4c1b71 100644 (file)
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
-       $Id: README,v 1.7 2001/05/15 16:03:33 baggins Exp $
+       $Id: README,v 1.8 2002/03/19 18:17:58 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.
+To use rc-scripts 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.
 
 If you want to use networking with rc-scripts you need
 compile few features such as:
@@ -23,18 +23,28 @@ Networking options  --->
         [*]      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.
+too. 
 
+Other required or suggested packages:
+
+| What?       | Package                       |
++-------------+-------------------------------+
+  IPX          ncfps
+  fourtun      fourtun and kernel module
+  bridge       bridge-utils
+  wireless     wireless-tools
+  IrDA         irda-utils
+  serial/ppp   ppp, dip, wvdial
+  serial/slip  slattach
+  
 Also you should know that format of interface configuration
 files is totally different from these used in RedHat/Mandrake
-initscripts.
+initscripts and even from stable rc-scripts branch.
 
 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,
+PLD GNU/Linux rc-scripts Team
 
index be27c6aa84de3f1d9396080b086609e62d25eda7..ce1d09a3f575f6dd92abc9fc01f11aba861b7309 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# $Id: autogen.sh,v 1.6 2001/05/15 16:03:33 baggins Exp $
+# $Id: autogen.sh,v 1.7 2002/03/19 18:17:58 misiek Exp $
 # Run this to generate all the initial makefiles, etc.
 
 srcdir=`dirname $0`
@@ -29,7 +29,7 @@ DIE=0
   (libtoolize --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`libtool' installed to compile $PKG_NAME."
-    echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz"
+    echo "Get ftp://alpha.gnu.org/gnu/libtool/libtool-1.4b.tar.gz"
     echo "(or a newer version if it is available)"
     DIE=1
   }
@@ -40,7 +40,7 @@ grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
   (gettextize --version) < /dev/null > /dev/null 2>&1 || {
     echo
     echo "**Error**: You must have \`gettext' installed to compile $PKG_NAME."
-    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.35.tar.gz"
+    echo "Get ftp://alpha.gnu.org/gnu/gettext-0.10.38.tar.gz"
     echo "(or a newer version if it is available)"
     DIE=1
   }
@@ -49,7 +49,7 @@ grep "^AM_GNU_GETTEXT" $srcdir/configure.in >/dev/null && {
 (automake --version) < /dev/null > /dev/null 2>&1 || {
   echo
   echo "**Error**: You must have \`automake' installed to compile $PKG_NAME."
-  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
   echo "(or a newer version if it is available)"
   DIE=1
   NO_AUTOMAKE=yes
@@ -61,7 +61,7 @@ test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || {
   echo
   echo "**Error**: Missing \`aclocal'.  The version of \`automake'"
   echo "installed doesn't appear recent enough."
-  echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz"
+  echo "Get ftp://sourceware.cygnus.com/pub/automake/automake-1.4-p4.tar.gz"
   echo "(or a newer version if it is available)"
   DIE=1
 }
@@ -121,10 +121,10 @@ do
        echo "Running autoheader..."
        autoheader
       fi
-      echo "Running automake --gnu $am_opt ..."
-      automake --add-missing --gnu $am_opt
       echo "Running autoconf ..."
       autoconf
+      echo "Running automake --gnu $am_opt ..."
+      automake --add-missing --gnu $am_opt
     )
   fi
 done
index d3dc047aa71138ee05fa739486aa644982c8b0b3..059febc255592cb0337b38fa96eaf1358ca6e263 100644 (file)
@@ -1,45 +1,23 @@
-dnl $Id: configure.in,v 1.40 2002/01/08 16:48:44 baggins Exp $
-AC_INIT()
-
+dnl $Id: configure.in,v 1.41 2002/03/19 18:17:58 misiek Exp $
 PACKAGE=rc-scripts
-VERSION=0.3.1
-ALL_LINGUAS="pl"
+VERSION=0.4.0
 
-SHSCRIPTS="rc.d/rc                     \
-       rc.d/init.d/allowlogin          \
-       rc.d/init.d/functions           \
-       rc.d/init.d/functions.network   \
-       rc.d/init.d/killall             \
-       rc.d/init.d/network             \
-       rc.d/init.d/random              \
-       rc.d/init.d/single              \
-       rc.d/init.d/timezone            \
-       rc.d/rc                         \
-       rc.d/rc.init                    \
-       rc.d/rc.local                   \
-       rc.d/rc.shutdown                \
-       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         \
-       "
+AC_INIT($PACKAGE, $VERSION, [pld-rc-scripts@pld.org.pl])
 
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define)
+ALL_LINGUAS="pl"
+
+echo -n "Finding shell scripts"
+SHSCRIPTS=""
+for shfile in $(find rc.d sysconfig -type f); do
+    echo -n "."
+    if (file ${shfile} | grep -q 'shell script'); then
+       SHSCRIPTS="${SHSCRIPTS} ${shfile}"
+    fi
+done
+echo "done"
 
 dnl Checks for programs.
+AC_ARG_PROGRAM
 AC_PROG_CC
 AC_ISC_POSIX
 AC_PROG_INSTALL
@@ -107,9 +85,11 @@ AC_SUBST(rcdir)
 AC_SUBST(docdir)
 AC_SUBST(libdir)
 
-AC_OUTPUT(Makefile src/Makefile doc/Makefile \
+AC_CONFIG_FILES([Makefile src/Makefile doc/Makefile \
        ppp/Makefile \
+       isapnp/Makefile \
        sysconfig/Makefile \
+       sysconfig/hwprofiles/Makefile \
        sysconfig/network-scripts/Makefile \
        sysconfig/interfaces/Makefile \
        sysconfig/interfaces/data/Makefile \
@@ -127,4 +107,5 @@ AC_OUTPUT(Makefile src/Makefile doc/Makefile \
        sysconfig/interfaces/down.d/tnl/Makefile \
        rc.d/Makefile rc.d/init.d/Makefile \
        po/Makefile \
-       rc-scripts.spec)
+       rc-scripts.spec])
+AC_OUTPUT
diff --git a/hwprofile b/hwprofile
new file mode 100755 (executable)
index 0000000..39b1ad4
--- /dev/null
+++ b/hwprofile
@@ -0,0 +1,248 @@
+#!/bin/sh
+# (C) 2001 Arkadiusz Mi¶kiewicz <misiek@pld.ORG.PL>
+# Hardware Profiles for rc-scripts TOTALNEW.
+# $Id: hwprofile,v 1.2 2002/03/19 18:19:57 misiek Exp $
+
+PROFDIR="/etc/sysconfig/hwprofiles"
+QUIET=0
+
+[ -z "${EDITOR} " ] && EDITOR=vi
+
+if [ "$(id -u)" != "0" ]; then
+       echo "Need superuser privileges. Can't continue!"
+       exit 1
+fi
+
+if [ ! -d ${PROFDIR} -o ! -d ${PROFDIR}/data ]; then
+       echo "${PROFDIR} or ${PROFDIR}/data not found. Can't continue!"
+       exit 1
+fi
+
+myecho()
+{
+  if [ "${QUIET}" != "1" ]; then
+    echo $@
+  fi
+}
+
+showhelp()
+{
+echo '
+no opts                - show help
+a              - add profile
+d              - delete profile
+r foo          - run specified profile or "default" if such exist
+s              - save/update running profile
+f              - find proper profile and run it
+l              - list configured profiles
+q              - be quiet (used only in few modes)
+
+Please send all bug reports to:
+pld-rc-scripts@pld.org.pl.
+'
+}
+
+# This function probably must be enhanced.
+md5sumgen()
+{
+  ( \
+  grep -v "MHz" /proc/cpuinfo 2> /dev/null \
+  cat /proc/pci 2> /dev/null \
+  ) | md5sum | awk ' { gsub(/ .*$/,NIL); print $0 } '
+}
+
+while getopts adflsqr: opt "$@"; do
+  case "$opt" in
+    a)
+       echo "Adding new profile..."
+       if [ -f /var/run/hwprofile ]; then
+         echo -n "Current profile is: "
+         cat /var/run/hwprofile
+       fi
+       PROFILE=
+       while [ -z "${PROFILE}" ]; do
+         echo -n "Enter profile name: "
+         read PROFILE
+         if [ -f ${PROFDIR}/${PROFILE}.md5 ]; then
+           echo "Profile ${PROFILE} exist. Try other name."
+           PROFILE=
+         fi
+       done
+       rm -rf ${PROFDIR}/${PROFILE}.* ${PROFDIR}/data/${PROFILE}/
+       md5sumgen > ${PROFDIR}/${PROFILE}.md5
+       LANG=C LC_ALL=C date > ${PROFDIR}/${PROFILE}.date
+       mkdir -p ${PROFDIR}/data/${PROFILE}/
+       chmod 700 ${PROFDIR}/data/${PROFILE}/
+       echo -n "Enter profile description (PROFDIR/${PROFILE}.desc): "
+       read DESCRIPTION
+       [ -z "${DESCRIPTION}" ] && DESCRIPTION="${PROFILE}"
+       echo "${DESCRIPTION}" > ${PROFDIR}/${PROFILE}.desc
+       echo "Now, editor will be started and you need to enter list of files"
+       echo "for this profile (later as ${PROFDIR}/${PROFILE}.files)."
+       echo "Press Enter."
+       read
+       ${EDITOR} ${PROFDIR}/${PROFILE}.files
+       FILES=
+       echo "Validating and copying valid files for this profile:"
+       for file in $(grep -v "^#" ${PROFDIR}/${PROFILE}.files); do
+         if [ ! -f ${file} -o "${file}" = "/etc/sysconfig/hwprof" ]; then
+           echo "${file}: invalid, skipping"
+           continue
+         fi
+         bfile=$(basename ${file})
+         echo "Copying ${file} to ${PROFDIR}/data/${PROFILE}/${file}..."
+         cp -dp --parents ${file} ${PROFDIR}/data/${PROFILE}/
+         FILES="${file}\n${FILES}"
+       done
+       echo -e "${FILES}" > ${PROFDIR}/${PROFILE}.files
+       rm -f ${PROFDIR}/${PROFILE}.*~
+       echo "New profile ready."
+       break
+       ;;
+    d)
+       echo "Deleting existing profile..."
+       PROFILE=
+       while [ -z ${PROFILE} ]; do
+         echo -n "Enter profile name: "
+         read PROFILE
+         if [ ! -f ${PROFDIR}/${PROFILE}.md5 ]; then
+           echo "Profile ${PROFILE} doesn't exist. Try other name."
+           PROFILE=
+         fi
+       done
+       echo -n "Are you sure? [t/N]: "
+       read YN
+       case "${YN}" in
+         y | t )
+               # ok
+         ;;
+         *)
+               echo "Exiting then."
+               exit 1
+         ;;
+       esac
+       rm -rf ${PROFDIR}/${PROFILE}.* ${PROFDIR}/data/${PROFILE}/
+       echo "Done."
+       break
+       ;;
+    r)
+       PROFILE="${OPTARG}"
+       if [ -z "${PROFILE}" -o ! -f ${PROFDIR}/${PROFILE}.files ]; then
+         echo "Can't setup ${PROFILE}. No required data."
+         exit 1
+       fi
+       echo "Setting up profile \"${PROFILE}\"..."
+       for file in $(grep -v "^#" ${PROFDIR}/${PROFILE}.files); do
+         if [ ! -f ${file} -o "${file}" = "/etc/sysconfig/hwprof" ]; then
+           echo "${file}: invalid, skipping"
+           continue
+         fi
+         echo "Copying ${PROFDIR}/data/${PROFILE}/${file} to ${file}..."
+         cp -dp ${PROFDIR}/data/${PROFILE}/${file} ${file}
+       done
+       myecho "Profile \"${PROFILE}\" running."
+       break
+       ;;
+    f)
+       PROFILE=
+       PROFILEMD5=$(md5sumgen)
+       myecho "Trying to find proper profile..."
+       for prof in $(ls -1 ${PROFDIR}/*.md5 2> /dev/null); do
+         prof=$(basename ${prof})
+         CURRENTMD5="$(cat ${PROFDIR}/${prof} 2> /dev/null)"
+         [ -z "${CURRENTMD5}" ] && continue
+         if [ "${CURRENTMD5}" = "${PROFILEMD5}" ]; then
+           PROFILE=$(echo ${prof} | awk ' { gsub(/\.md5/,NIL); print $0 } ')
+           break;
+         fi
+       done
+       if [ -z "${PROFILE}" ]; then
+           if [ ! -f ${PROFDIR}/default.md5 ]; then
+               echo "Valid profile not found. Starting with current files."
+               exit 0
+           else
+               echo "Valid profile not found. Starting with \"default\" profile."
+               PROFILE=default
+           fi
+       fi
+       myecho "Found profile \"${PROFILE}\" with md5sum \"${PROFILEMD5}\"."
+       $0 -r ${PROFILE}
+       break
+       ;;
+    s)
+        PROFILE=$(cat /var/run/hwprofile 2> /dev/null)
+       if [ -z "${PROFILE}" ]; then
+         echo "No profile currenty running."
+         exit 1
+       fi
+       if [ ! -f ${PROFDIR}/${PROFILE}.files ]; then
+         echo "${PROFILE}.files is missing. Can't continue."
+         exit 1
+       fi
+       echo "Saving/updating current profile..."
+       for file in $(grep -v "^#" ${PROFDIR}/${PROFILE}.files); do
+         if [ ! -f ${file} -o "${file}" = "/etc/sysconfig/hwprof" ]; then
+           echo "${file}: invalid, skipping"
+           continue
+         fi
+         echo "Copying ${file} to ${PROFDIR}/data/${PROFILE}/${file}"
+         cp -dp --parents ${file} ${PROFDIR}/data/${PROFILE}/
+       done
+       echo "Done."
+       break
+       ;;
+    l)
+       echo "List of configured profiles:"
+       for prof in $(ls -1 ${PROFDIR}/*.md5 2> /dev/null); do
+         prof=$(basename ${prof})
+         profname=$(echo ${prof} | awk ' { gsub(/\.md5/,NIL); print $0 } ')
+         echo    "Name    : ${profname}"
+         echo -n "Desc    : "
+         if [ -f ${PROFDIR}/${profname}.md5 ]; then
+           cat ${PROFDIR}/${profname}.desc
+         else
+           echo "MISSING"
+         fi
+         echo -n "Created : "
+         if [ -f ${PROFDIR}/${profname}.date ]; then
+           cat ${PROFDIR}/${profname}.date
+         else
+           echo "MISSING"
+         fi
+         echo -n "md5sum  : "
+         if [ -f ${PROFDIR}/${profname}.md5 ]; then
+           cat ${PROFDIR}/${profname}.md5
+         else
+           echo "MISSING"
+         fi
+         echo -n "Files   : "
+         if [ -f ${PROFDIR}/${profname}.files ]; then
+           cat ${PROFDIR}/${profname}.files | xargs
+         else
+           echo "MISSING"
+         fi
+         echo
+       done
+       echo "End."
+       break
+       ;;
+    q)
+       QUIET=1
+       ;;
+    *)
+       showhelp
+       exit 1
+       break
+       ;;
+  esac
+done
+
+if [ "$#" -le "0" ]; then
+  showhelp
+  exit 1
+fi
+
+exit 0
+
+# This must be last line !
+# vi:syntax=sh:tw=78:ts=8:sw=2
diff --git a/isapnp/.cvsignore b/isapnp/.cvsignore
new file mode 100644 (file)
index 0000000..668c106
--- /dev/null
@@ -0,0 +1,3 @@
+Makefile.in Makefile
+*~
+
diff --git a/isapnp/Makefile.am b/isapnp/Makefile.am
new file mode 100644 (file)
index 0000000..a78ebcf
--- /dev/null
@@ -0,0 +1,11 @@
+#
+#      $Id: Makefile.am,v 1.2 2002/03/19 18:18:03 misiek Exp $
+#
+
+isapnpdir = @sysconfigdir@/isapnp
+
+isapnp_DATA = \
+       isapnp-kernel.conf
+
+EXTRA_DIST = \
+       $(isapnp_DATA)
diff --git a/isapnp/isapnp-kernel.conf b/isapnp/isapnp-kernel.conf
new file mode 100644 (file)
index 0000000..10a8a3d
--- /dev/null
@@ -0,0 +1,13 @@
+# $Id: isapnp-kernel.conf,v 1.2 2002/03/19 18:18:03 misiek Exp $
+# Example configuration for Sierra V.34 Data/Fax/Voice/VoiceView Speakerphone
+# internal modem usable only on 2.4 kernels with ISAPNP support compiled in.
+# Read /usr/src/linux/Documentation/isapnp.txt for more informations.
+
+#card 0 SSC0109
+#dev 0 SSC0000
+#deactivate
+#card 0 SSC0109
+#dev 0 SSC0000
+#port 0 744
+#irq 0 3
+#activate
index 45434759f6aaa2973b8aea4d397130daf3f6c257..d1fc2ac19e3a3bb4a2375d76d87174e05227c90b 100644 (file)
@@ -3,7 +3,19 @@
 pppdir = @pppdir@
 
 ppp_SCRIPTS = \
+       auth-up \
+       auth-down \
        ip-up \
-       ip-down 
+       ip-down \
+       ipx-up \
+       ipx-down
 
 EXTRA_DIST = $(ppp_SCRIPTS)    
+
+install-data-hook: all
+       ln -s ip-up     $(DESTDIR)$(pppdir)/ipv6-up
+       ln -s ip-down   $(DESTDIR)$(pppdir)/ipv6-down
+
+uninstall-hook:
+       rm -f           $(DESTDIR)$(pppdir)/ipv6-up
+       rm -f           $(DESTDIR)$(pppdir)/ipv6-down
diff --git a/ppp/auth-down b/ppp/auth-down
new file mode 100755 (executable)
index 0000000..0e6c4e3
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $Id: auth-down,v 1.2 2002/03/19 18:18:06 misiek Exp $
+#
+# This script is run by the pppd _after_ the link is brought down.
+#
+# This script is called with the following arguments:
+#    Arg  Name                          Example
+#    $1   Interface name                ppp0
+#    $2   Peer name
+#    $3   User name
+#    $4   The tty                       ttyS1
+#    $5   The link speed                38400
+
+set +e
+
+# The  environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_PEER="$2"
+PPP_USER="$3"
+PPP_TTY="$4"
+PPP_SPEED="$5"
+export PPP_IFACE PPP_PEER PPP_USER PPP_TTY PPP_SPEED
+
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/functions.network 
+CONFIG="$PPP_IPPARAM"
+source_config
+
+# as an additional convienince, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=$(basename "$PPP_TTY")
+export PPP_TTYNAME
+
+# Main Script starts here
+[ -x /etc/ppp/auth-down.local ] && /etc/ppp/auth-down.local
+
+exit 0
diff --git a/ppp/auth-up b/ppp/auth-up
new file mode 100755 (executable)
index 0000000..47ea7f1
--- /dev/null
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $Id: auth-up,v 1.2 2002/03/19 18:18:06 misiek Exp $
+#
+# This script is run by the pppd after the link is established.
+#
+# This script is called with the following arguments:
+#    Arg  Name                          Example
+#    $1   Interface name                ppp0
+#    $2   Peer name
+#    $3   User name
+#    $4   The tty                       ttyS1
+#    $5   The link speed                38400
+
+set +e
+
+# The  environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_PEER="$2"
+PPP_USER="$3"
+PPP_TTY="$4"
+PPP_SPEED="$5"
+export PPP_IFACE PPP_PEER PPP_USER PPP_TTY PPP_SPEED
+
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/functions.network 
+CONFIG="$PPP_IPPARAM"
+source_config
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=$(basename "$PPP_TTY")
+export PPP_TTYNAME
+
+# Main script starts here.
+[ -x /etc/ppp/auth-up.local ] && /etc/ppp/auth-up.local 
+
+exit 0
index f1261730b14e73caf62ad7001e388745b177b161..3a8f13e2d05783eb19a0b1244bc7abd5a2718c41 100755 (executable)
@@ -1,14 +1,9 @@
 #!/bin/sh
 #
-# $Id: ip-down,v 1.6 2000/06/12 08:38:14 waszi Exp $
+# $Id: ip-down,v 1.7 2002/03/19 18:18:06 misiek Exp $
 # This file should not be modified
 #
 # This script is run by the pppd _after_ the link is brought down.
-# It uses run-parts to run scripts in /etc/ppp/ip-down.d, so to delete
-# routes, unset IP addresses etc. you should create script(s) there.
-#
-# Be aware that other packages may include /etc/ppp/ip-down.d scripts (named
-# after that package), so choose local script names with that in mind.
 #
 # This script is called with the following arguments:
 #    Arg  Name                          Example
@@ -19,6 +14,8 @@
 #    $5   Peer  IP number               12.34.56.99
 #    $6   Optional ``ipparam'' value    foo
 
+set +e
+
 # The  environment is cleared before executing this script
 # so the path must be reset
 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
@@ -32,16 +29,18 @@ PPP_REMOTE="$5"
 PPP_IPPARAM="$6"
 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
 
-. /etc/sysconfig/network-scripts/.functions 
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/functions.network 
 CONFIG="$PPP_IPPARAM"
 source_config
 
 # as an additional convienince, $PPP_TTYNAME is set to the tty name,
 # stripped of /dev/ (if present) for easier matching.
-PPP_TTYNAME=`/usr/bin/basename "$PPP_TTY"`
+PPP_TTYNAME=$(basename "$PPP_TTY")
 export PPP_TTYNAME
 
 # Main Script starts here
+[ -x /etc/ppp/ip-down.local ] && /etc/ppp/ip-down.local
 
 run-parts /etc/sysconfig/interfaces/down.d/ppp
 
index 5435150bd2e4200abcf5700d91ebf323fb8bcaaf..41b164be955bdbd00af6aae3ec3eb27c893a3968 100755 (executable)
--- a/ppp/ip-up
+++ b/ppp/ip-up
@@ -1,14 +1,9 @@
 #!/bin/sh
 #
-# $Id: ip-up,v 1.5 2000/05/07 19:00:00 siefca Exp $
+# $Id: ip-up,v 1.6 2002/03/19 18:18:06 misiek Exp $
 # This file should not be modified
 #
 # This script is run by the pppd after the link is established.
-# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
-# set IP address, run the mailq etc. you should create script(s) there.
-#
-# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
-# after that package), so choose local script names with that in mind.
 #
 # This script is called with the following arguments:
 #    Arg  Name                          Example
@@ -19,6 +14,8 @@
 #    $5   Peer  IP number               12.34.56.99
 #    $6   Optional ``ipparam'' value    foo
 
+set +e
+
 # The  environment is cleared before executing this script
 # so the path must be reset
 PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
@@ -31,17 +28,20 @@ PPP_LOCAL="$4"
 PPP_REMOTE="$5"
 PPP_IPPARAM="$6"
 export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
-. /etc/sysconfig/network-scripts/.functions 
+
+. /etc/rc.d/init.d/functions 
+. /etc/sysconfig/network-scripts/functions.network 
 CONFIG="$PPP_IPPARAM"
 source_config
 
 # as an additional convenience, $PPP_TTYNAME is set to the tty name,
 # stripped of /dev/ (if present) for easier matching.
-PPP_TTYNAME=`basename "$PPP_TTY"`
+PPP_TTYNAME=$(basename "$PPP_TTY")
 export PPP_TTYNAME
 
 # Main Script starts here
+[ -x /etc/ppp/ip-up.local ] && /etc/ppp/ip-up.local
+
 run-parts /etc/sysconfig/interfaces/up.d/ppp
 
 /etc/sysconfig/network-scripts/ifup-post "$CONFIG"
diff --git a/ppp/ipx-down b/ppp/ipx-down
new file mode 100755 (executable)
index 0000000..cc365b6
--- /dev/null
@@ -0,0 +1,62 @@
+#!/bin/sh
+#
+# $Id: ipx-down,v 1.2 2002/03/19 18:18:06 misiek Exp $
+# This file should not be modified
+#
+# This script is run by the pppd after the link is established.
+#
+# This script is called with the following arguments:
+#    Arg  Name                          Example
+#    $1   Interface name                ppp0
+#    $2   The tty                       ttyS1
+#    $3   The link speed                38400
+#    $4   The network number            ???
+#    $5   Local IPX node address        ???
+#    $6   Remote IPX node address       ???
+#    $7   Local IPX routing protocol    ???
+#    $8   Remote IPX routing protocol   ???
+#    $9   Local IPX router name         ???
+#    $10  Remote IPX router name        ???
+#    $11  Optional ``ipparam'' value    foo
+#    $12  PPPD pid                      1276
+
+set +e
+
+# The  environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_NETWORK="$4"
+PPP_LOCAL="$5"
+PPP_REMOTE="$6"
+PPP_LOCAL_RPROTO="$7"
+PPP_REMOTE_RPROTO="$8"
+PPP_LOCAL_RNAME="$9"
+PPP_REMOTE_RNAME="$10"
+PPP_IPPARAM="$11"
+PPP_PID="$12"
+
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_NETWORK PPP_LOCAL PPP_REMOTE
+export PPP_LOCAL_RPROTO PPP_REMOTE_RPROTO PPP_LOCAL_RNAME PPP_REMOTE_RNAME
+export PPP_IPPARAM PPP_PID
+
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/functions.network 
+CONFIG="$PPP_IPPARAM"
+source_config
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=$(basename "$PPP_TTY")
+export PPP_TTYNAME
+
+# Main Script starts here
+[ -x /etc/ppp/ipx-down.local ] && /etc/ppp/ipx-down.local 
+
+run-parts /etc/sysconfig/interfaces/down.d/ipx
+
+exit 0
diff --git a/ppp/ipx-up b/ppp/ipx-up
new file mode 100755 (executable)
index 0000000..d3f6b05
--- /dev/null
@@ -0,0 +1,67 @@
+#!/bin/sh
+#
+# $Id: ipx-up,v 1.2 2002/03/19 18:18:06 misiek Exp $
+# This file should not be modified
+#
+# This script is run by the pppd after the link is established.
+# It uses run-parts to run scripts in /etc/ppp/ip-up.d, so to add routes,
+# set IP address, run the mailq etc. you should create script(s) there.
+#
+# Be aware that other packages may include /etc/ppp/ip-up.d scripts (named
+# after that package), so choose local script names with that in mind.
+#
+# This script is called with the following arguments:
+#    Arg  Name                          Example
+#    $1   Interface name                ppp0
+#    $2   The tty                       ttyS1
+#    $3   The link speed                38400
+#    $4   The network number            ???
+#    $5   Local IPX node address        ???
+#    $6   Remote IPX node address       ???
+#    $7   Local IPX routing protocol    ???
+#    $8   Remote IPX routing protocol   ???
+#    $9   Local IPX router name         ???
+#    $10  Remote IPX router name        ???
+#    $11  Optional ``ipparam'' value    foo
+#    $12  PPPD pid                      1276
+
+set +e
+
+# The  environment is cleared before executing this script
+# so the path must be reset
+PATH=/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin
+export PATH
+# These variables are for the use of the scripts run by run-parts
+PPP_IFACE="$1"
+PPP_TTY="$2"
+PPP_SPEED="$3"
+PPP_NETWORK="$4"
+PPP_LOCAL="$5"
+PPP_REMOTE="$6"
+PPP_LOCAL_RPROTO="$7"
+PPP_REMOTE_RPROTO="$8"
+PPP_LOCAL_RNAME="$9"
+PPP_REMOTE_RNAME="$10"
+PPP_IPPARAM="$11"
+PPP_PID="$12"
+
+export PPP_IFACE PPP_TTY PPP_SPEED PPP_NETWORK PPP_LOCAL PPP_REMOTE
+export PPP_LOCAL_RPROTO PPP_REMOTE_RPROTO PPP_LOCAL_RNAME PPP_REMOTE_RNAME
+export PPP_IPPARAM PPP_PID
+
+. /etc/rc.d/init.d/functions
+. /etc/sysconfig/network-scripts/functions.network 
+CONFIG="$PPP_IPPARAM"
+source_config
+
+# as an additional convenience, $PPP_TTYNAME is set to the tty name,
+# stripped of /dev/ (if present) for easier matching.
+PPP_TTYNAME=$(basename "$PPP_TTY")
+export PPP_TTYNAME
+
+# Main Script starts here
+[ -x /etc/ppp/ipx-up.local ] && /etc/ppp/ipx-up.local 
+
+run-parts /etc/sysconfig/interfaces/up.d/ipx
+
+exit 0
diff --git a/service b/service
new file mode 100755 (executable)
index 0000000..a9c8ca7
--- /dev/null
+++ b/service
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+VERSION="`basename $0` ver. 0.91"
+USAGE="Usage: `basename $0` < option > | --status-all | \
+[ service_name [ command | --full-restart ] ]"
+SERVICE=
+if [ -d /etc/rc.d/init.d ]; then
+    SERVICEDIR="/etc/rc.d/init.d"
+else
+    SERVICEDIR="/etc/init.d"
+fi
+
+if [ $# -eq 0 ]; then
+   echo $"${USAGE}" >&2
+   exit 1
+fi
+
+while [ $# -gt 0 ]
+do
+  case "${1}" in
+    --help | -h | --h* )
+       echo $"${USAGE}" >&2
+       exit 0
+       ;;
+    --version | -V )
+       echo $"${VERSION}" >&2
+       exit 0
+       ;;
+    *)
+       if [ -z "${SERVICE}" -a $# -eq 1 -a "${1}" = "--status-all" ]; then
+          cd "${SERVICEDIR}"
+          for SERVICE in *; do
+            case "${SERVICE}" in
+              functions | halt | killall | single| linuxconf| kudzu | \
+                  *rpmorig | *rpmnew | *rpmsave | *~ | *.orig)
+                  ;;
+              *)
+                if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
+                  "${SERVICEDIR}/${SERVICE}" status
+                fi
+                ;;
+            esac
+          done
+          exit 0
+       elif [ $# -eq 2 -a "${2}" = "--full-restart" ]; then
+          SERVICE="${1}"
+          cd "${SERVICEDIR}"
+          if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
+            "${SERVICEDIR}/${SERVICE}" stop
+            "${SERVICEDIR}/${SERVICE}" start
+            exit $?
+          fi
+       elif [ -z "${SERVICE}" ]; then
+         SERVICE="${1}"
+       else
+         OPTIONS="${OPTIONS} ${1}"
+       fi
+       shift
+       ;;
+   esac
+done
+
+if [ -x "${SERVICEDIR}/${SERVICE}" ]; then
+   "${SERVICEDIR}/${SERVICE}" ${OPTIONS}
+else
+   echo "${SERVICE}: unrecognized service" >&2
+   exit 1
+fi
index d8f65e5b8d219df0dbf2419c21e640ccec19bbfb..ac77d046fa5407023a274b512098361e7e1e0108 100644 (file)
@@ -1,11 +1,12 @@
 @SET_MAKE@
 
-SUBDIRS = network-scripts interfaces
+SUBDIRS = network-scripts interfaces hwprofiles
 
 sysconfigdir = @sysconfigdir@
 
 sysconfig_DATA = \
        clock \
+       hwprof \
        system \
        network \
        static-routes \
diff --git a/sysconfig/hwprof b/sysconfig/hwprof
new file mode 100644 (file)
index 0000000..4672567
--- /dev/null
@@ -0,0 +1,5 @@
+# Hardware Profiles configuration
+
+# Enable HWPROFILES support?
+HWPROFILES=no
+
diff --git a/sysconfig/hwprofiles/.cvsignore b/sysconfig/hwprofiles/.cvsignore
new file mode 100644 (file)
index 0000000..282522d
--- /dev/null
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/sysconfig/hwprofiles/Makefile.am b/sysconfig/hwprofiles/Makefile.am
new file mode 100644 (file)
index 0000000..7cc2fa0
--- /dev/null
@@ -0,0 +1,3 @@
+@SET_MAKE@
+
+EXTRA_DIST = data
This page took 0.464062 seconds and 4 git commands to generate.