wok-6.x diff udev/receipt @ rev 18718
Up: tazpkg(890), cookutils(788)
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Thu Dec 17 15:58:11 2015 +0200 (2015-12-17) |
parents | 8f0d02db4d84 |
children | 9e01bc6321ea |
line diff
1.1 --- a/udev/receipt Wed Sep 10 13:04:01 2014 +0200 1.2 +++ b/udev/receipt Thu Dec 17 15:58:11 2015 +0200 1.3 @@ -85,19 +85,20 @@ 1.4 1.5 list_udev_group() 1.6 { 1.7 - object=$2 1.8 - [ -n "$object" ] || object=GROUP 1.9 - grep $object $1/etc/udev/rules.d/* | \ 1.10 - sed 's/.*GROUP="\([a-zA-Z0-9]*\)".*/\1/' | sort | uniq 1.11 + object=${2:-GROUP} 1.12 + grep $object $1/etc/udev/rules.d/* | \ 1.13 + sed "s|.*$object=\"\([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 "$1" GROUP | while read x ; do 1.20 - grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x 1.21 - done 1.22 - list_udev_group "$1" OWNER | while read x ; do 1.23 - grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x 1.24 - done 1.25 + # Sanity check for udev+ldap boot 1.26 + list_udev_group "$1" GROUP | \ 1.27 + while read x; do 1.28 + grep -q ^$x: $1/etc/group || chroot $1/ addgroup -S $x 1.29 + done 1.30 + list_udev_group "$1" OWNER | \ 1.31 + while read x; do 1.32 + grep -q ^$x: $1/etc/passwd || chroot $1/ adduser -S -D -H $x 1.33 + done 1.34 }