From 0ceb91ac5500256714cddecf25a8f48070ad7c19 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 20 Jan 2020 19:17:04 -0500 Subject: system/sddm: Fix sddm homedir detection. Signed-off-by: B. Watson --- system/sddm/sddm.SlackBuild | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'system/sddm') diff --git a/system/sddm/sddm.SlackBuild b/system/sddm/sddm.SlackBuild index f78fb72d19c6a..a977bd5c304c3 100644 --- a/system/sddm/sddm.SlackBuild +++ b/system/sddm/sddm.SlackBuild @@ -53,12 +53,15 @@ else LIBDIRSUFFIX="" fi -if grep sddm /etc/passwd | grep "/var/empty"; then - printf "%s\n%s\n%s\n%s\n" \ - "It appears that SDDM's home is set to /var/empty in /etc/passwd." \ - "This needs to be changed to /var/lib/sddm." \ - "To do this, run: usermod -d /var/lib/sddm sddm" \ - "This installation will now terminate." +SDDM_HOME="/var/lib/sddm" +PW_HOME="$( getent passwd sddm | cut -d: -f6 )" +if [ "$PW_HOME" != "$SDDM_HOME" ]; then + cat < $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild -mkdir -p $PKG/var/lib/sddm -chown sddm:sddm $PKG/var/lib/sddm +mkdir -p $PKG/$SDDM_HOME +chown sddm:sddm $PKG/$SDDM_HOME mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc -- cgit v1.2.3