wok diff hal/receipt @ rev 18730
Quote root dir in post_install
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Dec 20 15:13:45 2015 +0100 (2015-12-20) |
parents | 051931e905b0 |
children | ff5fd8788cd9 |
line diff
1.1 --- a/hal/receipt Fri Dec 06 10:39:07 2013 +0000 1.2 +++ b/hal/receipt Sun Dec 20 15:13:45 2015 +0100 1.3 @@ -96,21 +96,19 @@ 1.4 1.5 pre_install() 1.6 { 1.7 - local root 1.8 - root=$1 1.9 # Go for echoing on configuration files if any haldeamon user 1.10 # was found. 1.11 - if ! grep -q 'haldaemon' $root/etc/passwd; then 1.12 + if ! grep -q 'haldaemon' "$1/etc/passwd"; then 1.13 echo -n "Adding user: messagebus..." 1.14 - echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> $root/etc/passwd 1.15 - echo 'haldaemon:!:14013:0:99999:7:::' >> $root/etc/shadow 1.16 - echo 'haldaemon:x:26:' >> $root/etc/group 1.17 - echo 'haldaemon:!::' >> $root/etc/gshadow 1.18 + echo 'haldaemon:x:26:26:HAL Daemon User:/dev/null:/bin/false' >> "$1/etc/passwd" 1.19 + echo 'haldaemon:!:14013:0:99999:7:::' >> "$1/etc/shadow" 1.20 + echo 'haldaemon:x:26:' >> "$1/etc/group" 1.21 + echo 'haldaemon:!::' >> "$1/etc/gshadow" 1.22 status 1.23 fi 1.24 - if ! grep -q ^HALD_OPTIONS $root/etc/daemons.conf; then 1.25 - echo -n "Configuring $root/etc/daemons.conf..." 1.26 - cat >> $root/etc/daemons.conf << "EOT" 1.27 + if ! grep -q ^HALD_OPTIONS "$1/etc/daemons.conf"; then 1.28 + echo -n "Configuring /etc/daemons.conf..." 1.29 + cat >> "$1/etc/daemons.conf" << "EOT" 1.30 # HAL daemon options. 1.31 HALD_OPTIONS="--daemon=yes" 1.32