wok-stable diff udev/receipt @ rev 3174
udev: avoid ldap lookups during boot
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon May 25 13:11:56 2009 +0200 (2009-05-25) |
parents | c88d253cc8bb |
children | 77070ef5bae8 |
line diff
1.1 --- a/udev/receipt Sun May 24 00:19:23 2009 +0200 1.2 +++ b/udev/receipt Mon May 25 13:11:56 2009 +0200 1.3 @@ -55,3 +55,22 @@ 1.4 rm -f $1/lib/libudev.so.1.0 1.5 rm -f $1/lib/libudev.so.2.0 1.6 } 1.7 + 1.8 +list_udev_group() 1.9 +{ 1.10 + object=$1 1.11 + [ -n "$object" ] || object=GROUP 1.12 + grep $object /etc/udev/rules.d/* | \ 1.13 + sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq 1.14 +} 1.15 + 1.16 +post_install() 1.17 +{ 1.18 + # Sanity check for udev+ldap boot 1.19 + list_udev_group GROUP | while read x ; do 1.20 + grep -q ^$x: $/etc/group || chroot $1/ addgroup $x 1.21 + done 1.22 + list_udev_group OWNER | while read x ; do 1.23 + grep -q ^$x: $/etc/passwd || chroot $1/ adduser -S -D -H $x 1.24 + done 1.25 +}