wok rev 12195

udev: fix post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 26 15:56:49 2012 +0200 (2012-03-26)
parents 1134cd1d9d3c
children 0a6b5118575a
files udev/receipt
line diff
     1.1 --- a/udev/receipt	Mon Mar 26 00:34:43 2012 +0000
     1.2 +++ b/udev/receipt	Mon Mar 26 15:56:49 2012 +0200
     1.3 @@ -64,19 +64,19 @@
     1.4  
     1.5  list_udev_group()
     1.6  {
     1.7 -    object=$1
     1.8 +    object=$2
     1.9      [ -n "$object" ] || object=GROUP
    1.10 -    grep $object /etc/udev/rules.d/* | \
    1.11 -        sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq
    1.12 +    grep $object $1/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 +    list_udev_group "$1" GROUP | while read x ; do
    1.21          grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x
    1.22      done
    1.23 -    list_udev_group OWNER | while read x ; do
    1.24 +    list_udev_group "$1" OWNER | while read x ; do
    1.25          grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x
    1.26      done
    1.27  }