wok-4.x 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 | 37a6d35387dd |
children | f25b1712883d |
files | udev/receipt |
line diff
1.1 --- a/udev/receipt Mon May 25 09:12:59 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 +}