~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to utopic/etc/init/netscript-interface.conf

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# network-interface - configure network device
2
 
#
3
 
# This service causes network devices to be brought up or down as a result
4
 
# of hardware being added or removed, including that which isn't ordinarily
5
 
# removable.
6
 
#
7
 
# Based on work by 
8
 
# Scott James Remnant <scott@ubuntu.com>  Tue, 15 Sep 2009 03:30:29 +0100
9
 
# copyright 2009 Canonical Limited. License GPL v2
10
 
# changes for netscript-2.4
11
 
# copyright 2011 Matthew Alexander Grant License GPL V2
12
 
# Matthew Grant <matthewgrant5@gmail.com>
13
 
 
14
 
description     "configure network device"
15
 
 
16
 
start on stopped rc RUNLEVEL=[2345] and net-device-added
17
 
stop on runlevel [2345] and net-device-removed INTERFACE=$INTERFACE
18
 
 
19
 
instance $INTERFACE
20
 
 
21
 
pre-start script
22
 
        if [ "$INTERFACE" != "lo" ]; then
23
 
                exec netscript ifup $INTERFACE
24
 
        fi
25
 
end script
26
 
 
27
 
post-stop script
28
 
        if [ "$INTERFACE" != "lo" ]; then
29
 
                exec netscript ifdown $INTERFACE
30
 
        fi
31
 
end script