FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux General Discussion

 
 
LinkBack Thread Tools
 
Old 06-30-2010, 09:47 PM
Victor Lowther
 
Default Load conf files in a loop instead of one at a time.

---
network | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/network b/network
index 977e81e..242acc3 100755
--- a/network
+++ b/network
@@ -3,14 +3,9 @@
. /etc/rc.conf
. /etc/rc.d/functions

-# wireless settings
-[ -f /etc/conf.d/wireless ] && . /etc/conf.d/wireless
-# ethernet bonding settings
-[ -f /etc/conf.d/bonding ] && . /etc/conf.d/bonding
-# bridge settings
-[ -f /etc/conf.d/bridges ] && . /etc/conf.d/bridges
-# dhcpcd settings
-[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd
+for s in wireless bonding bridges dhcpcd; do
+ [[ -f /etc/conf.d/$s ]] && . "/etc/conf.d/$s"
+done

ifup()
{
--
1.7.1
 
Old 07-16-2010, 12:04 PM
Thomas Bächler
 
Default Load conf files in a loop instead of one at a time.

Am 30.06.2010 23:47, schrieb Victor Lowther:
> ---
> network | 11 +++--------
> 1 files changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/network b/network
> index 977e81e..242acc3 100755
> --- a/network
> +++ b/network
> @@ -3,14 +3,9 @@
> . /etc/rc.conf
> . /etc/rc.d/functions
>
> -# wireless settings
> -[ -f /etc/conf.d/wireless ] && . /etc/conf.d/wireless
> -# ethernet bonding settings
> -[ -f /etc/conf.d/bonding ] && . /etc/conf.d/bonding
> -# bridge settings
> -[ -f /etc/conf.d/bridges ] && . /etc/conf.d/bridges
> -# dhcpcd settings
> -[ -f /etc/conf.d/dhcpcd ] && . /etc/conf.d/dhcpcd
> +for s in wireless bonding bridges dhcpcd; do
> + [[ -f /etc/conf.d/$s ]] && . "/etc/conf.d/$s"
> +done
>
> ifup()
> {

ACKed.
 

Thread Tools




All times are GMT. The time now is 12:19 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org