# HG changeset patch # User Pascal Bellard # Date 1332770209 -7200 # Node ID 329bc88c9d170acfb83ff88e812feb937ceafff3 # Parent 1134cd1d9d3c85632d04e7ec5375fc60d94ecff7 udev: fix post_install diff -r 1134cd1d9d3c -r 329bc88c9d17 udev/receipt --- a/udev/receipt Mon Mar 26 00:34:43 2012 +0000 +++ b/udev/receipt Mon Mar 26 15:56:49 2012 +0200 @@ -64,19 +64,19 @@ list_udev_group() { - object=$1 + object=$2 [ -n "$object" ] || object=GROUP - grep $object /etc/udev/rules.d/* | \ - sed "s/.*GROUP=\"\\([a-zA-Z0-9]*\\)\".*/\1/" | sort | uniq + grep $object $1/etc/udev/rules.d/* | \ + sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq } post_install() { # Sanity check for udev+ldap boot - list_udev_group GROUP | while read x ; do + list_udev_group "$1" GROUP | while read x ; do grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x done - list_udev_group OWNER | while read x ; do + list_udev_group "$1" OWNER | while read x ; do grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x done }