Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
53077da060 |
2
Makefile
2
Makefile
@@ -14,7 +14,7 @@ URL =
|
|||||||
BRIEF = Scripts for starting and stopping network interfaces
|
BRIEF = Scripts for starting and stopping network interfaces
|
||||||
DESC = Scripts which use the iproute2 tools for automatically starting and \
|
DESC = Scripts which use the iproute2 tools for automatically starting and \
|
||||||
stopping network devices during startup.
|
stopping network devices during startup.
|
||||||
SNAPVER = 1
|
SNAPVER = 2
|
||||||
|
|
||||||
ARCHIVE :=
|
ARCHIVE :=
|
||||||
SRCDIR := $(PWD)/SRC/iftools
|
SRCDIR := $(PWD)/SRC/iftools
|
||||||
|
|||||||
20
SNAP/usher
Executable file
20
SNAP/usher
Executable file
@@ -0,0 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
case $1 in
|
||||||
|
preinst)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postinst)
|
||||||
|
if [ ! -f ${TARGET}/etc/network.conf ]; then
|
||||||
|
cp ${TARGET}/usr/share/iftools/network.conf ${TARGET}/etc/network.conf
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
prerm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
postrm)
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -3,8 +3,10 @@ dirs:
|
|||||||
install -d -v -m 755 $(DESTDIR)/etc/network.d
|
install -d -v -m 755 $(DESTDIR)/etc/network.d
|
||||||
install -d -v -m 755 $(DESTDIR)/usr/share/iftools
|
install -d -v -m 755 $(DESTDIR)/usr/share/iftools
|
||||||
install -d -v -m 755 $(DESTDIR)/usr/share/man/man{5,8}
|
install -d -v -m 755 $(DESTDIR)/usr/share/man/man{5,8}
|
||||||
|
install -d -v -m 755 $(DESTDIR)/sbin
|
||||||
|
|
||||||
files:
|
files:
|
||||||
|
install -v -m 755 ifup $(DESTDIR)/sbin/ifup
|
||||||
install -v -m 755 network.init $(DESTDIR)/etc/init.d/network
|
install -v -m 755 network.init $(DESTDIR)/etc/init.d/network
|
||||||
install -v -m 755 network.conf \
|
install -v -m 755 network.conf \
|
||||||
$(DESTDIR)/usr/share/iftools/network.conf
|
$(DESTDIR)/usr/share/iftools/network.conf
|
||||||
@@ -12,4 +14,12 @@ files:
|
|||||||
$(DESTDIR)/usr/share/man/man5/network.conf.5
|
$(DESTDIR)/usr/share/man/man5/network.conf.5
|
||||||
install -v -m 644 ifup.8 $(DESTDIR)/usr/share/man/man8/ifup.8
|
install -v -m 644 ifup.8 $(DESTDIR)/usr/share/man/man8/ifup.8
|
||||||
|
|
||||||
install: dirs files
|
links:
|
||||||
|
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifdown.8
|
||||||
|
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifquery.8
|
||||||
|
ln -s ifup.8 $(DESTDIR)/usr/share/man/man8/ifreload.8
|
||||||
|
ln -s ifup $(DESTDIR)/sbin/ifdown
|
||||||
|
ln -s ifup $(DESTDIR)/sbin/ifquery
|
||||||
|
ln -s ifup $(DESTDIR)/sbin/ifreload
|
||||||
|
|
||||||
|
install: dirs files links
|
||||||
|
|||||||
@@ -1,16 +1,4 @@
|
|||||||
auto lo
|
auto lo
|
||||||
iface lo inet loopback
|
iface lo inet loopback
|
||||||
|
|
||||||
# An example of an interface automatically started on boot with dhcp
|
|
||||||
#auto eth0
|
|
||||||
#iface eth0 inet dhcp
|
|
||||||
|
|
||||||
# Another example with a static IP and static route
|
|
||||||
#iface eth1 inet static
|
|
||||||
# address 192.168.0.202
|
|
||||||
# netmask 255.255.255.0
|
|
||||||
# gateway 192.168.0.1
|
|
||||||
# route 192.168.3.0 via 192.168.0.100
|
|
||||||
|
|
||||||
# This requests that all files in /etc/network.d be appended
|
|
||||||
source-directory network.d
|
source-directory network.d
|
||||||
|
|||||||
@@ -1,30 +1,30 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
# Provides: $network
|
# Provides: $network
|
||||||
# Required-Start: $local_fs swap localnet
|
# Required-Start: $local_fs swap
|
||||||
# Required-Stop: $local_fs swap localnet
|
# Required-Stop: $local_fs swap
|
||||||
# Should-Start: $syslog
|
# Should-Start: $syslog
|
||||||
# Should-Stop: $syslog
|
# Should-Stop: $syslog
|
||||||
# Default-Start: 3 4 5
|
# Default-Start: 3 4 5
|
||||||
# Default-Stop: 0 1 2 6
|
# Default-Stop: 0 1 2 6
|
||||||
# Short-Description: Starts and configures network interfaces.
|
# Short-Description: Start and configure network interfaces
|
||||||
# Description: Starts and configures network interfaces.
|
# X-Required: true
|
||||||
### END INIT INFO
|
### END INIT INFO
|
||||||
|
|
||||||
. /lib/lsb/init-functions
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
log_info_msg "Bringing up network interfaces"
|
log_init_msg "Bringing up network interfaces"
|
||||||
ifup -a && log_success_msg || log_failure_msg
|
ifup -a && log_success_msg || log_failure_msg
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
log_info_msg "Bringing down network interfaces"
|
log_init_msg "Bringing down network interfaces"
|
||||||
ifdown -a && log_success_msg || log_failure_msg
|
ifdown -a && log_success_msg || log_failure_msg
|
||||||
;;
|
;;
|
||||||
|
|
||||||
reload|restart)
|
reload|restart)
|
||||||
log_info_msg "Restarting network interfaced"
|
log_init_msg "Restarting network interfaces"
|
||||||
ifreload -a && log_success_msg || log_failure_msg
|
ifreload -a && log_success_msg || log_failure_msg
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user