# HG changeset patch # User Mallory MOLLO # Date 1242672283 -7200 # Node ID 192bfaa1ae87ef30471cd5024933ab39362bcbf7 # Parent ee420562a299e0e8f7dd4350eb388a4fa81c6e0d Fluxbox: add entry into Slim sessions diff -r ee420562a299 -r 192bfaa1ae87 fluxbox/receipt --- a/fluxbox/receipt Mon May 18 02:37:18 2009 +0200 +++ b/fluxbox/receipt Mon May 18 20:44:43 2009 +0200 @@ -34,3 +34,22 @@ cp -a $_pkg/usr/share $fs/usr } +post_install() +{ + res=`cat $1/etc/slim.conf | grep ^session | sed s/"sessions. *"//` + # Adding WM to SLIM available sessions. + if ! echo "$res" | grep -q $PACKAGE; then + echo -n "Adding $PACKAGE to /etc/slim.conf..." + sed -i "s/^sessions.*/sessions ${res},$PACKAGE/" /etc/slim.conf + status + fi +} + +post_remove() +{ + # Remove WM from SLIM available sessions. + if grep -q $PACKAGE $1/etc/slim.conf; then + sed -i s/,$PACKAGE// $1/etc/slim.conf + fi +} +