wok-next diff sudo-pam/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 | 66940c68d29e |
children | 6fab3264ba87 |
line diff
1.1 --- a/sudo-pam/receipt Tue Apr 01 08:27:12 2014 +0000 1.2 +++ b/sudo-pam/receipt Sun Dec 20 15:13:45 2015 +0100 1.3 @@ -42,25 +42,21 @@ 1.4 1.5 pre_install() 1.6 { 1.7 - local root 1.8 - root=$1 1.9 echo "Processing pre-install commands..." 1.10 - if [ -f $root/etc/sudoers.bak ]; then 1.11 - cp $root/etc/sudoers $root/etc/sudoers.bak 1.12 + if [ -f "$1/etc/sudoers.bak" ]; then 1.13 + cp "$1/etc/sudoers" "$1/etc/sudoers.bak" 1.14 fi 1.15 } 1.16 1.17 post_install() 1.18 { 1.19 - local root 1.20 - root=$1 1.21 echo "Processing post-install commands..." 1.22 - if [ -f $root/etc/sudoers.bak ]; then 1.23 - rm -f $root/etc/sudoers 1.24 - mv $root/etc/sudoers.bak $root/etc/sudoers 1.25 + if [ -f "$1/etc/sudoers.bak" ]; then 1.26 + rm -f "$1/etc/sudoers" 1.27 + mv "$1/etc/sudoers.bak" "$1/etc/sudoers" 1.28 else 1.29 - chown root.root $root/etc/sudoers 1.30 - chmod 0440 $root/etc/sudoers 1.31 + chown root.root "$1/etc/sudoers" 1.32 + chmod 0440 "$1/etc/sudoers" 1.33 fi 1.34 } 1.35