summaryrefslogtreecommitdiff
path: root/pcr/sddm-consolekit/sddm.install
diff options
context:
space:
mode:
authorfreaj <freaj@riseup.net>2015-03-30 11:39:16 +0200
committerfreaj <freaj@riseup.net>2015-03-30 11:39:16 +0200
commitc5fe79e3c01d97dda3448eca34ef5ea342193735 (patch)
tree49112ceb5b9b93b7b4e018b22fc5d9622ad840dd /pcr/sddm-consolekit/sddm.install
parent3e7d2cc71cc301002d39ab205216f0542924f038 (diff)
sddm-consolekit: add new package to [pcr]
Diffstat (limited to 'pcr/sddm-consolekit/sddm.install')
-rw-r--r--pcr/sddm-consolekit/sddm.install24
1 files changed, 24 insertions, 0 deletions
diff --git a/pcr/sddm-consolekit/sddm.install b/pcr/sddm-consolekit/sddm.install
new file mode 100644
index 000000000..904a73ac2
--- /dev/null
+++ b/pcr/sddm-consolekit/sddm.install
@@ -0,0 +1,24 @@
+post_install() {
+ if ! getent group sddm > /dev/null; then
+ groupadd --system sddm
+ fi
+ if ! getent passwd sddm > /dev/null; then
+ useradd -c "Simple Desktop Display Manager" --system -d /var/lib/sddm -s /usr/bin/nologin -g sddm sddm
+ passwd -l sddm > /dev/null
+ fi
+ mkdir -p /var/lib/sddm
+ chown -R sddm:sddm /var/lib/sddm > /dev/null
+}
+
+post_upgrade() {
+ post_install $1
+}
+
+post_remove() {
+ if getent passwd sddm >/dev/null; then
+ userdel sddm
+ fi
+ if getent group sddm >/dev/null; then
+ groupdel sddm
+ fi
+}