wok-current rev 272
We need to backup/restore JWM config
author | Christophe Lincoln <pankso@slitaz.org> |
---|---|
date | Mon Feb 25 15:33:46 2008 +0100 (2008-02-25) |
parents | 90463812cd74 |
children | f7cff624b2d2 |
files | jwm/receipt |
line diff
1.1 --- a/jwm/receipt Mon Feb 25 14:24:30 2008 +0100 1.2 +++ b/jwm/receipt Mon Feb 25 15:33:46 2008 +0100 1.3 @@ -26,11 +26,30 @@ 1.4 # Rules to gen a SliTaz package suitable for Tazpkg. 1.5 genpkg_rules() 1.6 { 1.7 - mkdir -p $fs/usr/bin 1.8 - mkdir -p $fs/etc/jwm 1.9 - cp -a $src/src/jwm $fs/usr/bin 1.10 - strip -s $fs/usr/bin/* 1.11 - # Simple config file. 1.12 - cp stuff/simple.jwmrc $fs/etc/jwm/system.jwmrc 1.13 - cp stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc 1.14 + mkdir -p $fs/usr/bin $fs/etc/jwm 1.15 + cp -a $src/src/jwm $fs/usr/bin 1.16 + # Simple config file. 1.17 + cp stuff/simple.jwmrc $fs/etc/jwm/system.jwmrc 1.18 + cp stuff/simple.jwmrc $fs/etc/jwm/simple.jwmrc 1.19 } 1.20 + 1.21 +# Pre and post install to backup all /etc/settings 1.22 +# 1.23 +pre_install() 1.24 +{ 1.25 + local root 1.26 + root=$1 1.27 + echo "" 1.28 + echo "Creating backup of JWM system configuration..." 1.29 + cp -a $root/etc/jwm/system.jwmrc cp -a $root/etc/jwm/system.jwmrc.bak 2>/dev/null 1.30 + echo "" 1.31 +} 1.32 +post_install() 1.33 +{ 1.34 + local root 1.35 + root=$1 1.36 + echo "" 1.37 + echo "Restoring backup of JWM system configuration..." 1.38 + cp -a $root/etc/jwm/system.jwmrc.bak $root/etc/jwm/system.jwmrc 2>/dev/null 1.39 + echo "" 1.40 +}