wok-6.x rev 3113

Fluxbox: add entry into Slim sessions
author Mallory MOLLO <mallory@skyrock.com>
date Mon May 18 20:44:43 2009 +0200 (2009-05-18)
parents ee420562a299
children fbb5d580ddc3
files fluxbox/receipt
line diff
     1.1 --- a/fluxbox/receipt	Mon May 18 02:37:18 2009 +0200
     1.2 +++ b/fluxbox/receipt	Mon May 18 20:44:43 2009 +0200
     1.3 @@ -34,3 +34,22 @@
     1.4  	cp -a $_pkg/usr/share $fs/usr
     1.5  }
     1.6  
     1.7 +post_install()
     1.8 +{
     1.9 +	res=`cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//`
    1.10 +	# Adding WM to SLIM available sessions.
    1.11 +	if ! echo "$res" | grep -q $PACKAGE; then
    1.12 +		echo -n "Adding $PACKAGE to /etc/slim.conf..."
    1.13 +		sed -i "s/^sessions.*/sessions            ${res},$PACKAGE/" /etc/slim.conf
    1.14 +		status
    1.15 +	fi
    1.16 +}
    1.17 +
    1.18 +post_remove()
    1.19 +{
    1.20 +	# Remove WM from SLIM available sessions.
    1.21 +	if grep -q $PACKAGE $1/etc/slim.conf; then
    1.22 +		sed -i s/,$PACKAGE// $1/etc/slim.conf
    1.23 +	fi
    1.24 +}
    1.25 +