From 170547010f78a0b195157b60f3c7cae4a3380a86 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 19 Apr 2009 08:52:00 +0000 Subject: Pull /etc/ifconfig.eth0 into interfaces Reverse list of interfaces when stopping Improve build for conf.d/network --- conf.d/Makefile | 5 +++++ conf.d/Makefile.FreeBSD | 3 --- conf.d/Makefile.Linux | 4 ---- conf.d/Makefile.NetBSD | 3 --- conf.d/network.in | 13 ++++++++++--- 5 files changed, 15 insertions(+), 13 deletions(-) (limited to 'conf.d') diff --git a/conf.d/Makefile b/conf.d/Makefile index 9d0fc0d0..a884b46b 100644 --- a/conf.d/Makefile +++ b/conf.d/Makefile @@ -1,9 +1,14 @@ DIR= ${CONFDIR} CONF= bootmisc fsck hostname local localmount network urandom +TARGETS+= network CLEANFILES+= network MK= ../mk include ${MK}/os.mk include Makefile.${OS} include ${MK}/scripts.mk + +network: network.in network.${OS} + cp network.in network + [ -e network.${OS} ] && cat network.${OS} >> network diff --git a/conf.d/Makefile.FreeBSD b/conf.d/Makefile.FreeBSD index fb531e2f..c43a1d4f 100644 --- a/conf.d/Makefile.FreeBSD +++ b/conf.d/Makefile.FreeBSD @@ -1,4 +1 @@ CONF+= ipfw moused powerd rarpd savecore syscons - -network: - cp network.in network diff --git a/conf.d/Makefile.Linux b/conf.d/Makefile.Linux index 9e1ce9d8..74679400 100644 --- a/conf.d/Makefile.Linux +++ b/conf.d/Makefile.Linux @@ -1,5 +1 @@ CONF+= consolefont dmesg hwclock keymaps modules - -network: - cp network.in network - cat network.Linux >> network diff --git a/conf.d/Makefile.NetBSD b/conf.d/Makefile.NetBSD index fd0be1ec..18a52cce 100644 --- a/conf.d/Makefile.NetBSD +++ b/conf.d/Makefile.NetBSD @@ -1,4 +1 @@ CONF+= moused rarpd savecore - -network: - cp network.in network diff --git a/conf.d/network.in b/conf.d/network.in index 2bb2b071..469494d6 100644 --- a/conf.d/network.in +++ b/conf.d/network.in @@ -1,10 +1,17 @@ -# Assign static IP addresses and run custom scripts per interface +# Assign static IP addresses and run custom scripts per interface. # Seperate commands with ; -# Prefix with ! to run a shell script +# Prefix with ! to run a shell script. # ifconfig_eth0="up; 192.168.0.10 netmask 255.255.255.0; ! echo up" # You also have ifup_eth0 and ifdown_eth0 to run other commands when # eth0 is started and stopped. # Lastly, the interfaces variable pulls in virtual interfaces that cannot -# be automatically detected. +# be automatically detected. + +# You can also use files instead of variables here if you like: +# /etc/ifconfig.eth0 is equivalent to ifconfig_eth0 +# /etc/ip.eth0 is equivalent to ifconfig_eth0 +# /etc/ifup.eth0 is equivalent to ifup_eth0 +# /etc/ifdown.eth0 is equivalent to ifdown_eth0 +# Any files found will automatically be put into the interfaces variable. -- cgit v1.2.3