generic userid: use the new USERID api
recent changes in trunk allow us to specify the userid inside the openwrt makefile. the info is stored int he meta data of the IPK contorl file and users are generated by the new generic postinst trigger. Signed-off-by: John Crispin <blogic@openwrt.org>
This commit is contained in:
parent
85695f4561
commit
d4042ec35e
22 changed files with 11 additions and 23 deletions
|
@ -32,6 +32,7 @@ define Package/zabbix/Default
|
||||||
URL:=http://www.zabbix.com/
|
URL:=http://www.zabbix.com/
|
||||||
SUBMENU:=zabbix
|
SUBMENU:=zabbix
|
||||||
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
MAINTAINER:=Etienne CHAMPETIER <champetier.etienne@gmail.com>
|
||||||
|
USERID:=zabbix=53:zabbix=53
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/zabbix-agent
|
define Package/zabbix-agent
|
||||||
|
|
|
@ -19,8 +19,6 @@ start() {
|
||||||
}
|
}
|
||||||
|
|
||||||
grep -q "^AllowRoot=1" ${CONFIG} || {
|
grep -q "^AllowRoot=1" ${CONFIG} || {
|
||||||
user_exists zabbix 53 || user_add zabbix 53
|
|
||||||
group_exists zabbix 53 || group_add zabbix 53
|
|
||||||
touch ${SERVICE_PID_FILE}
|
touch ${SERVICE_PID_FILE}
|
||||||
chown zabbix:zabbix ${SERVICE_PID_FILE}
|
chown zabbix:zabbix ${SERVICE_PID_FILE}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,7 @@ define Package/dovecot
|
||||||
TITLE:=An IMAP and POP3 daemon
|
TITLE:=An IMAP and POP3 daemon
|
||||||
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
||||||
URL:=http://www.dovecot.org/
|
URL:=http://www.dovecot.org/
|
||||||
|
USERID:=dovecot=59:dovecot=59
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/dovecot/description
|
define Package/dovecot/description
|
||||||
|
|
|
@ -7,8 +7,6 @@ STOP=75
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
user_exists dovecot 59 || user_add dovecot 59
|
|
||||||
group_exists dovecot 59 || group_add dovecot 59
|
|
||||||
mkdir -p -m 0755 /var/lib/dovecot
|
mkdir -p -m 0755 /var/lib/dovecot
|
||||||
mkdir -p -m 0755 /var/run/dovecot
|
mkdir -p -m 0755 /var/run/dovecot
|
||||||
chmod 0750 /var/lib/dovecot
|
chmod 0750 /var/lib/dovecot
|
||||||
|
|
|
@ -32,6 +32,7 @@ define Package/dmapd
|
||||||
DEPENDS:=+libdmapsharing +libdb47 +vips
|
DEPENDS:=+libdmapsharing +libdb47 +vips
|
||||||
TITLE:= dmapd
|
TITLE:= dmapd
|
||||||
URL:=http://www.flyn.org/projects/dmapd/
|
URL:=http://www.flyn.org/projects/dmapd/
|
||||||
|
USERID:=dmapd=56:dmapd=56
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/dmapd/decription
|
define Package/dmapd/decription
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
START=60
|
START=60
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
user_exists dmapd 56 || user_add dmapd 56
|
|
||||||
group_exists dmapd 56 || group_add dmapd 56
|
|
||||||
[ -d /var/run/dmapd ] || {
|
[ -d /var/run/dmapd ] || {
|
||||||
mkdir -m 0755 -p /var/run/dmapd
|
mkdir -m 0755 -p /var/run/dmapd
|
||||||
chown dmapd:dmapd /var/run/dmapd
|
chown dmapd:dmapd /var/run/dmapd
|
||||||
|
|
|
@ -30,6 +30,7 @@ define Package/$(PKG_NAME)/default
|
||||||
URL:=http://www.mosquitto.org/
|
URL:=http://www.mosquitto.org/
|
||||||
MAINTAINER:=Karl Palsson <karlp@remake.is>
|
MAINTAINER:=Karl Palsson <karlp@remake.is>
|
||||||
DEPENDS:= +librt
|
DEPENDS:= +librt
|
||||||
|
USERID:=mosquitto=200:mosquitto=200
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/$(PKG_NAME)
|
define Package/$(PKG_NAME)
|
||||||
|
|
|
@ -14,7 +14,6 @@ SERVICE_DAEMONIZE=1
|
||||||
SERVICE_WRITE_PID=1
|
SERVICE_WRITE_PID=1
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
user_exists mosquitto 200 || user_add mosquitto 200
|
|
||||||
if [ "$USE_UCI_CONFIG" -eq 1 ]; then
|
if [ "$USE_UCI_CONFIG" -eq 1 ]; then
|
||||||
CONF=/tmp/mosquitto.converted.$$.conf
|
CONF=/tmp/mosquitto.converted.$$.conf
|
||||||
mosquitto.uci.convert -f $CONF
|
mosquitto.uci.convert -f $CONF
|
||||||
|
|
|
@ -31,6 +31,7 @@ define Package/ntpd/Default
|
||||||
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
||||||
URL:=http://www.ntp.org/
|
URL:=http://www.ntp.org/
|
||||||
DEPENDS:=+libcap
|
DEPENDS:=+libcap
|
||||||
|
USERID:=ntp=123:ntp=123
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ntpd/Default/description
|
define Package/ntpd/Default/description
|
||||||
|
|
|
@ -9,8 +9,6 @@ USE_PROCD=1
|
||||||
start_service() {
|
start_service() {
|
||||||
# ln -sf /dev/ttyS0 /dev/gps0
|
# ln -sf /dev/ttyS0 /dev/gps0
|
||||||
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
|
# /usr/sbin/setgarmin -d /dev/gps -c /etc/setgarmin.conf
|
||||||
user_exists ntp 123 || user_add ntp 123 123 ntp /var/lib/ntp
|
|
||||||
group_exists ntp 123 || group_add ntp 123
|
|
||||||
mkdir -p /var/lib/ntp
|
mkdir -p /var/lib/ntp
|
||||||
chown -R ntp:ntp /var/lib/ntp
|
chown -R ntp:ntp /var/lib/ntp
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,7 @@ define Package/ocserv
|
||||||
URL:=http://www.infradead.org/ocserv/
|
URL:=http://www.infradead.org/ocserv/
|
||||||
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
|
MAINTAINER:=Nikos Mavrogiannopoulos <n.mavrogiannopoulos@gmail.com>
|
||||||
DEPENDS:= +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
|
DEPENDS:= +libgnutls +certtool +libncurses +libreadline +OCSERV_PAM:libpam +OCSERV_PROTOBUF:libprotobuf-c
|
||||||
|
USERID:=ocserv=72:ocserv=72
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ocserv/description
|
define Package/ocserv/description
|
||||||
|
|
|
@ -86,9 +86,6 @@ setup_dns() {
|
||||||
start() {
|
start() {
|
||||||
local hostname iface
|
local hostname iface
|
||||||
|
|
||||||
user_exists ocserv 72 || user_add ocserv 72 72 /var/lib/ocserv
|
|
||||||
group_exists ocserv 72 || group_add ocserv 72
|
|
||||||
|
|
||||||
hostname=`uci get ddns.myddns.domain`
|
hostname=`uci get ddns.myddns.domain`
|
||||||
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname`
|
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname`
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,7 @@ define Package/openssh/Default
|
||||||
URL:=http://www.openssh.com/
|
URL:=http://www.openssh.com/
|
||||||
SUBMENU:=SSH
|
SUBMENU:=SSH
|
||||||
VARIANT:=without-pam
|
VARIANT:=without-pam
|
||||||
|
USERID:=sshd=22:sshd=22
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/openssh-moduli
|
define Package/openssh-moduli
|
||||||
|
|
|
@ -18,8 +18,6 @@ start_service() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}; done
|
}; done
|
||||||
user_exists sshd 22 || user_add sshd 22 22 sshd /var/empty
|
|
||||||
group_exists sshd 22 || group_add sshd 22
|
|
||||||
mkdir -m 0700 -p /var/empty
|
mkdir -m 0700 -p /var/empty
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
|
|
|
@ -29,6 +29,7 @@ define Package/portmap
|
||||||
TITLE:=The RPC Portmapper
|
TITLE:=The RPC Portmapper
|
||||||
URL:=http://neil.brown.name/portmap/
|
URL:=http://neil.brown.name/portmap/
|
||||||
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
||||||
|
USERID:=rpc=65533:rpc=65533
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/portmap/description
|
define Package/portmap/description
|
||||||
|
|
|
@ -7,9 +7,6 @@ STOP=19
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
user_exists rpc 65533 || user_add rpc 65533 65533 rpc /var/empty
|
|
||||||
group_exists rpc 65533 || group_add rpc 65533
|
|
||||||
|
|
||||||
procd_open_instance
|
procd_open_instance
|
||||||
procd_set_param command /usr/sbin/portmap -f
|
procd_set_param command /usr/sbin/portmap -f
|
||||||
procd_close_instance
|
procd_close_instance
|
||||||
|
|
|
@ -28,6 +28,7 @@ define Package/prosody
|
||||||
DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua
|
DEPENDS:=+luafilesystem +libidn +luaexpat +luasec +libopenssl +libidn +liblua
|
||||||
TITLE:=XMPP server
|
TITLE:=XMPP server
|
||||||
URL:=http://prosody.im/
|
URL:=http://prosody.im/
|
||||||
|
USERID:=prosody=54:prosody=54
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/prosody/description
|
define Package/prosody/description
|
||||||
|
|
|
@ -14,8 +14,6 @@ RUN_USER=prosody
|
||||||
RUN_GROUP=prosody
|
RUN_GROUP=prosody
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
user_exists prosody 54 || user_add prosody 54
|
|
||||||
group_exists prosody 54 || group_add prosody 54
|
|
||||||
[ -d /var/run/prosody ] || {
|
[ -d /var/run/prosody ] || {
|
||||||
mkdir -m 0755 -p /var/run/prosody
|
mkdir -m 0755 -p /var/run/prosody
|
||||||
chown prosody:prosody /var/run/prosody
|
chown prosody:prosody /var/run/prosody
|
||||||
|
|
|
@ -27,6 +27,7 @@ define Package/tor/Default
|
||||||
SECTION:=net
|
SECTION:=net
|
||||||
CATEGORY:=Network
|
CATEGORY:=Network
|
||||||
URL:=https://www.torproject.org/
|
URL:=https://www.torproject.org/
|
||||||
|
USERID:=tor=52:tor=52
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/tor/Default/description
|
define Package/tor/Default/description
|
||||||
|
|
|
@ -7,8 +7,6 @@ STOP=50
|
||||||
USE_PROCD=1
|
USE_PROCD=1
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
user_exists tor 52 || user_add tor 52 52 /var/lib/tor
|
|
||||||
group_exists tor 52 || group_add tor 52
|
|
||||||
[ -f /var/run/tor.pid ] || {
|
[ -f /var/run/tor.pid ] || {
|
||||||
touch /var/run/tor.pid
|
touch /var/run/tor.pid
|
||||||
chown tor:tor /var/run/tor.pid
|
chown tor:tor /var/run/tor.pid
|
||||||
|
|
|
@ -38,6 +38,7 @@ define Package/pulseaudio/Default
|
||||||
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
MAINTAINER:=Peter Wagner <tripolar@gmx.at>
|
||||||
URL:=http://www.pulseaudio.org
|
URL:=http://www.pulseaudio.org
|
||||||
PROVIDES:=pulseaudio
|
PROVIDES:=pulseaudio
|
||||||
|
USERID:=pulse=51:pulse=51
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/pulseaudio-daemon
|
define Package/pulseaudio-daemon
|
||||||
|
|
|
@ -8,8 +8,6 @@ USE_PROCD=1
|
||||||
PROG=/usr/bin/pulseaudio
|
PROG=/usr/bin/pulseaudio
|
||||||
|
|
||||||
start_service() {
|
start_service() {
|
||||||
user_exists pulse 51 || user_add pulse 51
|
|
||||||
group_exists pulse 51 || group_add pulse 51
|
|
||||||
[ -d /var/run/pulse ] || {
|
[ -d /var/run/pulse ] || {
|
||||||
mkdir -m 0755 -p /var/run/pulse
|
mkdir -m 0755 -p /var/run/pulse
|
||||||
chmod 0750 /var/run/pulse
|
chmod 0750 /var/run/pulse
|
||||||
|
|
Loading…
Reference in a new issue