Mail archive
alpine-aports

[alpine-aports] [PATCH 11/15] community/[various]: Add group and use it as primary in .pre-* scripts.

From: Przemyslaw Pawelczyk <przemoc_at_zoho.com>
Date: Mon, 6 Jun 2016 02:05:11 +0200

Fixes the problem I unintentionally brought in commit ccc056dbf9d3:
system user creation doesn't add same named group and uses nogroup as
primary group unless explicitly specified via -G.

Brings status quo regarding primary groups of users created in packages:
- community/caddy
- community/domoticz
- community/oscam
- community/syncthing
---
 community/caddy/caddy.pre-install         | 3 ++-
 community/domoticz/domoticz.pre-install   | 3 ++-
 community/oscam/oscam.pre-install         | 3 ++-
 community/syncthing/syncthing.pre-install | 3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/community/caddy/caddy.pre-install b/community/caddy/caddy.pre-install
index ccb4f07..0830288 100644
--- a/community/caddy/caddy.pre-install
+++ b/community/caddy/caddy.pre-install
_at_@ -1,6 +1,7 @@
 #!/bin/sh
 
-adduser -S -D -h /var/lib/caddy -s /sbin/nologin -g caddy caddy 2>/dev/null
+addgroup -S caddy 2>/dev/null
+adduser -S -D -h /var/lib/caddy -s /sbin/nologin -G caddy -g caddy caddy 2>/dev/null
 adduser caddy www-data 2>/dev/null
 
 exit 0
diff --git a/community/domoticz/domoticz.pre-install b/community/domoticz/domoticz.pre-install
index 2272067..6be1d39 100644
--- a/community/domoticz/domoticz.pre-install
+++ b/community/domoticz/domoticz.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -h /var/lib/domoticz -s /sbin/nologin -g domoticz domoticz 2>/dev/null
+addgroup -S domoticz 2>/dev/null
+adduser -S -D -h /var/lib/domoticz -s /sbin/nologin -G domoticz -g domoticz domoticz 2>/dev/null
 
 exit 0
diff --git a/community/oscam/oscam.pre-install b/community/oscam/oscam.pre-install
index a9982c7..cce6bcd 100644
--- a/community/oscam/oscam.pre-install
+++ b/community/oscam/oscam.pre-install
_at_@ -1,6 +1,7 @@
 #!/bin/sh
 
-adduser -S -D -H -s /sbin/nologin -g oscam oscam 2>/dev/null
+addgroup -S oscam 2>/dev/null
+adduser -S -D -H -s /sbin/nologin -G oscam -g oscam oscam 2>/dev/null
 addgroup oscam usb 2>/dev/null
 
 exit 0
diff --git a/community/syncthing/syncthing.pre-install b/community/syncthing/syncthing.pre-install
index a2ee46c..685d7ed 100644
--- a/community/syncthing/syncthing.pre-install
+++ b/community/syncthing/syncthing.pre-install
_at_@ -1,5 +1,6 @@
 #!/bin/sh
 
-adduser -S -D -H -h /var/lib/syncthing -s /sbin/nologin -g syncthing syncthing 2>/dev/null
+addgroup -S syncthing 2>/dev/null
+adduser -S -D -H -h /var/lib/syncthing -s /sbin/nologin -G syncthing -g syncthing syncthing 2>/dev/null
 
 exit 0
-- 
2.6.6
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Mon Jun 06 2016 - 02:05:11 GMT