• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/netplug/S29netplug
Luca CeresoliLuca Ceresoli committed 1a994d58afc15 Mar 2012
Raw file
Source viewDiff to previous
xxxxxxxxxx
 
1
#!/bin/sh
2
#
3
# netplugd     This shell script takes care of starting and stopping
4
#              the network plug management daemon.
5
#
6
# chkconfig: - 11 89
7
# description: netplugd is a daemon for managing non-static network \
8
#              interfaces.
9
# processname: netplugd
10
# pidfile: /var/run/netplugd.pid
11
​
12
# Copyright 2003 Key Research, Inc.
13
​
14
# Source function library.
15
if [ -f /etc/init.d/functions ]; then
16
    . /etc/init.d/functions
17
elif [ -f /etc/rc.d/init.d/functions ]; then
18
    . /etc/rc.d/init.d/functions
19
fi
20
​
21
# Source networking configuration.
22
if [ -f /etc/sysconfig/network ]; then
23
    . /etc/sysconfig/network
24
​
25
    # Check that networking is up.
26
    [ ${NETWORKING} = "no" ] && exit 0
27
elif [ ! -f /etc/network/interfaces ]; then
28
    # No network support
29
    exit 0
30
fi
31
​
32
[ -x /sbin/netplugd ] || exit 0
33
​
34
if [ -f /etc/sysconfig/netplugd ]; then
35
    . /etc/sysconfig/netplugd
36
fi
37
​
38
# See how we were called.
39
case "$1" in
40
  start)
41
    # Start daemon.
42
    echo -n "Starting network plug daemon: "
43
    start-stop-daemon -S -q -p /var/run/netplugd.pid -x /sbin/netplugd ${NETPLUGDARGS}
44
    RETVAL=$?
45
    echo
46
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/netplugd
47
    ;;
48
  stop)
49
    # Stop daemon.
50
    echo -n "Shutting down network plug daemon: "
51
    start-stop-daemon -K -n netplugd
52
    RETVAL=$?
53
    echo
54
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/netplugd
55
    ;;
56
  restart|reload)
57
    $0 stop
58
    $0 start
59
    ;;
60
  condrestart)
61
    [ -f /var/lock/subsys/netplugd ] && $0 restart || :
62
    ;;
63
  *)
64
    echo "Usage: $0 {start|stop|restart}"
65
    RETVAL=1
66
    ;;
67
esac
68
​
69
exit $RETVAL
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.