le-greeter: Add triggers to reconfigure lightdm.conf when needed

Signed-off-by: 's avatarDiego Giovane Pasqualin <dpasqualin@c3sl.ufpr.br>
parent 955ba733
Package: le-greeter Package: le-greeter
Priority: important Priority: important
Section: main Section: main
Version: 0.1.32 Version: 0.1.35
Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br> Maintainer: LE Maintainer <le-maintainer@c3sl.ufpr.br>
Description: Login screen theme and configurations for Linux Educacional 5.0 Description: Login screen theme and configurations for Linux Educacional 5.0
Architecture: i386 Architecture: i386
Provides: unity-greeter Provides: unity-greeter
Conflicts: unity-greeter Conflicts: unity-greeter
Replaces: unity-greeter Replaces: unity-greeter
Depends: lightdm, liblightdm-gobject-1-0 Depends: le-interface, lightdm, liblightdm-gobject-1-0
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
# USA. # USA.
# Create default home directory for guest users (alunos)
mkdir -p /etc/le/home_alunos || true
# Copy default home (/etc/skel) to the new directory
cp -rT /etc/skel /etc/le/home_alunos
if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then if [ -x /usr/lib/lightdm/lightdm-set-defaults ] ; then
/usr/lib/lightdm/lightdm-set-defaults --keep-old\ /usr/lib/lightdm/lightdm-set-defaults --keep-old\
--greeter=unity-greeter || true --greeter=unity-greeter || true
...@@ -52,22 +46,28 @@ if test -f /etc/le/data_iso.txt; then ...@@ -52,22 +46,28 @@ if test -f /etc/le/data_iso.txt; then
if grep -q '^allow-guest' /etc/lightdm/lightdm.conf; then if grep -q '^allow-guest' /etc/lightdm/lightdm.conf; then
if test "$DIST" = "escola" -o "$DIST" = "light"; then if test "$DIST" = "escola" -o "$DIST" = "light"; then
sed -i -e '/^greeter-show-manual-login/s/false/true/' \ sed -i -e '/^greeter-show-manual-login/s/false/true/' \
etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
sed -i -e '/^allow-guest/s/false/true/' \ sed -i -e '/^allow-guest/s/false/true/' \
/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
elif test "$DIST" = "home" -o "$DIST" = "multiterminal"; then elif test "$DIST" = "home" -o "$DIST" = "multiterminal"; then
sed -i -e '/^greeter-show-manual-login/s/true/false/' \ sed -i -e '/^greeter-show-manual-login/s/true/false/' \
etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
sed -i -e '/^allow-guest/s/true/false/' \ sed -i -e '/^allow-guest/s/true/false/' \
/etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
fi fi
else else
if test "$DIST" = "escola" -o "$DIST" = "light"; then if test "$DIST" = "escola" -o "$DIST" = "light"; then
echo "allow-guest=true" >> /etc/lightdm/lightdm.conf sed -i '/\[SeatDefaults\]/ a\allow-guest=true' \
echo "greeter-show-manual-login=true" >> /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
sed -i '/\[SeatDefaults\]/ a\greeter-show-manual-login=true' \
/etc/lightdm/lightdm.conf
elif test "$DIST" = "home" -o "$DIST" = "multiterminal"; then elif test "$DIST" = "home" -o "$DIST" = "multiterminal"; then
echo "greeter-show-manual-login=false" >> /etc/lightdm/lightdm.conf sed -i '/\[SeatDefaults\]/ a\greeter-show-manual-login=false' \
echo "allow-guest=false" >> /etc/lightdm/lightdm.conf /etc/lightdm/lightdm.conf
sed -i '/\[SeatDefaults\]/ a\allow-guest=false' \
/etc/lightdm/lightdm.conf
fi fi
fi fi
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment