/[baselayout]/trunk/net.Linux/ipppd.sh
Gentoo

Contents of /trunk/net.Linux/ipppd.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2547 - (show annotations) (download) (as text)
Thu Apr 5 11:18:42 2007 UTC (7 years ago) by uberlord
File MIME type: text/x-sh
File size: 1010 byte(s)
    Rewrite the core parts in C. We now provide librc so other programs can
    query runlevels, services and state without using bash. We also provide
    libeinfo so other programs can easily use our informational functions.

    As such, we have dropped the requirement of using bash as the init script
    shell. We now use /bin/sh and have strived to make the scripts as portable
    as possible. Shells that work are bash and dash. busybox works provided
    you disable s-s-d. If you have WIPE_TMP set to yes in conf.d/bootmisc you
    should disable find too.
    zsh and ksh do not work at this time.

    Networking support is currently being re-vamped also as it was heavily bash
    array based. As such, a new config format is available like so
    config_eth0="1.2.3.4/24 5.6.7.8/16"
    or like so
    config_eth0="'1.2.3.4 netmask 255.255.255.0' '5.6.7.8 netmask 255.255.0.0'"

    We will still support the old bash array format provided that /bin/sh IS
    a link it bash.

    ChangeLog for baselayout-1 can be found in our SVN repo.
1 # Copyright 2004-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3
4 ipppd_depend() {
5 program start /usr/sbin/ipppd
6 after macnet
7 before interface
8 provide isdn
9 }
10
11 _config_vars="$_config_vars ipppd"
12
13 ipppd_pre_start() {
14 local opts= pidfile="/var/run/ipppd-${IFACE}.pid"
15
16 # Check that we are a valid ippp interface
17 case "${IFACE}" in
18 ippp[0-9]*) ;;
19 *) return 0 ;;
20 esac
21
22 # Check that the interface exists
23 _exists || return 1
24
25 # Might or might not be set in conf.d/net
26 eval opts=\$ipppd_${IFVAR}
27
28 einfo "Starting ipppd for ${IFACE}"
29 start-stop-daemon --start --exec /usr/sbin/ipppd \
30 --pidfile "${pidfile}" \
31 -- ${opts} pidfile "${pidfile}" \
32 file "/etc/ppp/options.${IFACE}" >/dev/null
33 eend $?
34 }
35
36 ipppd_post_stop() {
37 local pidfile="/var/run/ipppd-${IFACE}.pid"
38
39 [ ! -f "${pidfile}" ] && return 0
40
41 einfo "Stopping ipppd for ${IFACE}"
42 start-stop-daemon --stop --quiet --exec /usr/sbin/ipppd \
43 --pidfile "${pidfile}"
44 eend $?
45 }
46
47 # vim: set ts=4 :

  ViewVC Help
Powered by ViewVC 1.1.20