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 Flatten adding persistent rules.

---
rc.sysinit | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/rc.sysinit b/rc.sysinit
index c6ed35f..ac32fca 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -342,16 +342,12 @@ fi
set_consolefont

# Adding persistent network/cdrom generated rules
-if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
- stat_busy "Adding persistent cdrom udev rules"
- /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
- stat_done
-fi
-if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
- stat_busy "Adding persistent network udev rules"
- /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
- stat_done
-fi
+for f in cd net; do
+ [[ -f /dev/.udev/tmp-rules--70-persistent-$f.rules ]] || continue
+ stat_busy "Adding persistent $f udev rules"
+ /bin/cat "/dev/.udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules"
+ stat_done
+done

/bin/dmesg >| /var/log/dmesg.log

--
1.7.1
 
Old 07-16-2010, 12:04 PM
Thomas Bächler
 
Default Flatten adding persistent rules.

Am 30.06.2010 23:47, schrieb Victor Lowther:
> ---
> rc.sysinit | 16 ++++++----------
> 1 files changed, 6 insertions(+), 10 deletions(-)
>
> diff --git a/rc.sysinit b/rc.sysinit
> index c6ed35f..ac32fca 100755
> --- a/rc.sysinit
> +++ b/rc.sysinit
> @@ -342,16 +342,12 @@ fi
> set_consolefont
>
> # Adding persistent network/cdrom generated rules
> -if [ -f "/dev/.udev/tmp-rules--70-persistent-cd.rules" ]; then
> - stat_busy "Adding persistent cdrom udev rules"
> - /bin/cat /dev/.udev/tmp-rules--70-persistent-cd.rules >> /etc/udev/rules.d/70-persistent-cd.rules
> - stat_done
> -fi
> -if [ -f "/dev/.udev/tmp-rules--70-persistent-net.rules" ]; then
> - stat_busy "Adding persistent network udev rules"
> - /bin/cat /dev/.udev/tmp-rules--70-persistent-net.rules >> /etc/udev/rules.d/70-persistent-net.rules
> - stat_done
> -fi
> +for f in cd net; do
> + [[ -f /dev/.udev/tmp-rules--70-persistent-$f.rules ]] || continue
> + stat_busy "Adding persistent $f udev rules"
> + /bin/cat "/dev/.udev/tmp-rules--70-persistent-$f.rules" >> "/etc/udev/rules.d/70-persistent-$f.rules"
> + stat_done
> +done
>
> /bin/dmesg >| /var/log/dmesg.log
>

ACKed
 

Thread Tools




All times are GMT. The time now is 08:47 PM.

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