wok diff lxde/receipt @ rev 13601

pdns: add post_install
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Nov 10 13:54:41 2012 +0100 (2012-11-10)
parents 4c7322d54d65
children 2a5cc8208d36
line diff
     1.1 --- a/lxde/receipt	Sat Nov 03 10:51:02 2012 +0100
     1.2 +++ b/lxde/receipt	Sat Nov 10 13:54:41 2012 +0100
     1.3 @@ -9,7 +9,7 @@
     1.4  TAGS="wm desktop"
     1.5  SUGGESTED="lxterminal lxdm pcmanfm"
     1.6  
     1.7 -DEPENDS="xorg-libX11 gtk+ lxpanel lxtask lxappearance lxsession
     1.8 +DEPENDS="xorg-libX11 gtk+ lxpanel lxtask lxappearance lxsession \
     1.9  lxsession-edit lxrandr lxinput openbox obconf viewnior leafpad \
    1.10  slitaz-configs"
    1.11  
    1.12 @@ -27,6 +27,8 @@
    1.13  # Add WM to SLIM available sessions.
    1.14  post_install()
    1.15  {
    1.16 +	local root
    1.17 +	root=$1
    1.18  	res=$(cat $root/etc/slim.conf | grep ^session | sed s/"sessions. *"//)
    1.19  	if ! echo "$res" | grep -q $PACKAGE; then
    1.20  		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.21 @@ -38,6 +40,8 @@
    1.22  # Remove WM from SLIM available sessions.
    1.23  post_remove()
    1.24  {
    1.25 +	local root
    1.26 +	root=$1
    1.27  	if grep -q $PACKAGE $root/etc/slim.conf; then
    1.28  		sed -i s/,$PACKAGE// $root/etc/slim.conf
    1.29  	fi