wok rev 12559

lxde: add session in slim
author Christophe Lincoln <pankso@slitaz.org>
date Sat Apr 28 15:46:08 2012 +0200 (2012-04-28)
parents 873a0ed5aab7
children 49e1774e4196
files lxde/receipt
line diff
     1.1 --- a/lxde/receipt	Sat Apr 28 14:44:50 2012 +0200
     1.2 +++ b/lxde/receipt	Sat Apr 28 15:46:08 2012 +0200
     1.3 @@ -23,3 +23,22 @@
     1.4  	cp -a $stuff/lxde-logout.desktop $fs/usr/share/applications
     1.5  	chown -R 0.0 $fs
     1.6  }
     1.7 +
     1.8 +# Add WM to SLIM available sessions.
     1.9 +post_install()
    1.10 +{
    1.11 +	res=$(cat $root/etc/slim.conf | grep ^session | sed s/"sessions. *"//)
    1.12 +	if ! echo "$res" | grep -q $PACKAGE; then
    1.13 +		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.14 +		sed -i "s/^sessions.*/sessions            ${res},$PACKAGE/" $root/etc/slim.conf
    1.15 +		status
    1.16 +	fi
    1.17 +}
    1.18 +
    1.19 +# Remove WM from SLIM available sessions.
    1.20 +post_remove()
    1.21 +{
    1.22 +	if grep -q $PACKAGE $root/etc/slim.conf; then
    1.23 +		sed -i s/,$PACKAGE// $root/etc/slim.conf
    1.24 +	fi
    1.25 +}