wok-4.x diff slitaz-tools/receipt @ rev 1155
Add openldap
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sun Jul 27 09:18:17 2008 +0000 (2008-07-27) |
parents | 4ae1b641e09a |
children | 534023d6e005 |
line diff
1.1 --- a/slitaz-tools/receipt Wed Jul 16 15:42:10 2008 +0000 1.2 +++ b/slitaz-tools/receipt Sun Jul 27 09:18:17 2008 +0000 1.3 @@ -80,6 +80,21 @@ 1.4 chmod -R 755 $fs/sbin 1.5 } 1.6 1.7 +# Pre install commands. 1.8 +pre_install() 1.9 +{ 1.10 + local root 1.11 + root=$1 1.12 + # Backup file to restore with post install 1.13 + echo "Creating backups of configs..." 1.14 + cp $root/etc/TZ $root/etc/TZ.bak 2>/dev/null 1.15 + cp $root/etc/keymap.conf $root/etc/keymap.conf.bak 2>/dev/null 1.16 + cp $root/etc/X11/screen.conf $root/etc/X11/screen.conf.bak 2>/dev/null 1.17 + cp $root/etc/locale.conf $root/etc/locale.conf.bak 2>/dev/null 1.18 + cp $root/etc/firewall.conf $root/etc/firewall.conf.bak 2>/dev/null 1.19 +} 1.20 + 1.21 +# Post install 1.22 post_install() 1.23 { 1.24 ( cd $1/ ; cpio -o -H newc | gzip -9 ) > \ 1.25 @@ -91,6 +106,12 @@ 1.26 etc/locale.conf 1.27 etc/firewall.conf 1.28 EOT 1.29 + echo "Restoring configs backups..." 1.30 + mv -f $root/etc/TZ.bak $root/etc/TZ 2>/dev/null 1.31 + mv -f $root/etc/keymap.conf.bak $root/etc/keymap.conf 2>/dev/null 1.32 + mv -f $root/etc/X11/screen.conf.bak $root/etc/X11/screen.conf 2>/dev/null 1.33 + mv -f $root/etc/locale.conf.bak $root/etc/locale.conf 2>/dev/null 1.34 + mv -f $root/etc/firewall.conf.bak $root/etc/firewall.conf 2>/dev/null 1.35 } 1.36 1.37 repack_cleanup()