diff options
Diffstat (limited to 'system/sddm/sddm.SlackBuild')
-rw-r--r-- | system/sddm/sddm.SlackBuild | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/system/sddm/sddm.SlackBuild b/system/sddm/sddm.SlackBuild index f78fb72d19..a977bd5c30 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 |