aboutsummaryrefslogtreecommitdiff
path: root/system/sddm/sddm.SlackBuild
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2020-01-20 19:17:04 -0500
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2020-01-26 08:10:00 +0700
commit0ceb91ac5500256714cddecf25a8f48070ad7c19 (patch)
treece6d65e0d3ea9d30d30fa97684f29ac0236c72ce /system/sddm/sddm.SlackBuild
parent3f287d35f4dfa200df59283afa15dfe161dc578a (diff)
system/sddm: Fix sddm homedir detection.
Signed-off-by: B. Watson <yalhcru@gmail.com>
Diffstat (limited to 'system/sddm/sddm.SlackBuild')
-rw-r--r--system/sddm/sddm.SlackBuild19
1 files changed, 11 insertions, 8 deletions
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 <<EOF
+It appears that the sddm user's home is set to $PW_HOME in /etc/passwd.
+This needs to be changed to $SDDM_HOME
+To do this, run: usermod -d $SDDM_HOME sddm
+This installation will now terminate.
+EOF
exit 1
fi
@@ -108,8 +111,8 @@ cp -a \
$PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $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