wok-6.x diff sudo/receipt @ rev 2505
lxnetdaemon: fix compile_rules
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Mar 16 12:22:25 2009 +0000 (2009-03-16) |
parents | 59a23b491383 |
children | 18af88b9fa23 |
line diff
1.1 --- a/sudo/receipt Sat Oct 04 13:10:07 2008 +0000 1.2 +++ b/sudo/receipt Mon Mar 16 12:22:25 2009 +0000 1.3 @@ -41,12 +41,24 @@ 1.4 strip -s $fs/usr/lib/sudo_noexec.so 1.5 } 1.6 1.7 +pre_install() 1.8 +{ 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 + fi 1.13 +} 1.14 1.15 post_install() 1.16 { 1.17 local root 1.18 root=$1 1.19 echo "Processing post-install commands..." 1.20 - chown root.root $root/etc/sudoers 1.21 - chmod 0440 $root/etc/sudoers 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 + else 1.26 + chown root.root $root/etc/sudoers 1.27 + chmod 0440 $root/etc/sudoers 1.28 + fi 1.29 }