lightdm: fix the openrc service, provide a session wrapper. It's usable now...

This commit is contained in:
Juan RP 2011-02-16 16:47:29 +01:00
parent 573cb2351f
commit be22fb70c2
2 changed files with 23 additions and 0 deletions

View file

@ -7,3 +7,17 @@ depend()
{
need dbus localmount
}
start()
{
ebegin "Starting ${name}"
start-stop-daemon --start --quiet --background --exec ${command}
eend $?
}
stop()
{
ebegin "Stopping ${name}"
start-stop-daemon --stop --exec ${command}
eend $?
}

View file

@ -32,6 +32,8 @@ Add_dependency run gdk-pixbuf
Add_dependency run gtk+
Add_dependency run liblightdm-gobject
Add_dependency build pkg-config
Add_dependency build intltool
Add_dependency build glib-devel
Add_dependency build dbus-glib-devel
Add_dependency build dbus-devel
@ -48,17 +50,24 @@ Add_dependency build webkit-gtk-devel
Add_dependency build libxcb-devel
Add_dependency build libXdmcp-devel
Add_dependency build pam-devel
Add_dependency build vala-devel
Add_dependency full gnome-icon-theme
Add_dependency full dbus
post_install()
{
local xs="/usr/share/lightdm/Xsession"
# Remove provided init file use our own.
rm -rf ${DESTDIR}/etc/init
install -D -m755 ${FILESDIR}/lightdm.rc ${DESTDIR}/etc/init.d/lightdm
install -D -m644 ${FILESDIR}/lightdm.pam ${DESTDIR}/etc/pam.d/lightdm
install -D -m755 ${FILESDIR}/Xsession ${DESTDIR}/${xs}
# Minimum UID shall be 1000 for ordinary users.
sed -i -e "s|^\#\(minimum-uid=\).*|\11000|" ${DESTDIR}/etc/lightdm.conf
# Provide a working session wrapper.
sed -i -e "s|^\#\(session-wrapper=\).*|\1${xs}|" \
${DESTDIR}/etc/lightdm.conf
}