[packages] portmap: switch to new procd init script style and create and use the "rpc"
user instead of the "nobody" user for the daemon Signed-off-by: Peter Wagner <tripolar@gmx.at> git-svn-id: svn://svn.openwrt.org/openwrt/packages@38134 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
b3c8c23ce3
commit
4dab57f79f
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=portmap
|
||||
PKG_VERSION:=6.0
|
||||
PKG_RELEASE:=3
|
||||
PKG_RELEASE:=4
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tgz
|
||||
PKG_SOURCE_URL:=http://neil.brown.name/portmap/
|
||||
@ -37,7 +37,7 @@ endef
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS) -DHOSTS_ACCESS -DFACILITY=LOG_DAEMON -DIGNORE_SIGCHLD" \
|
||||
RPCUSER="nobody" \
|
||||
RPCUSER="rpc" \
|
||||
LDLIBS="$(TARGET_LDFLAGS) -lwrap $(LIBRPC)" \
|
||||
all
|
||||
|
||||
|
@ -4,10 +4,13 @@
|
||||
START=19
|
||||
STOP=19
|
||||
|
||||
start() {
|
||||
service_start /usr/sbin/portmap
|
||||
}
|
||||
USE_PROCD=1
|
||||
|
||||
stop() {
|
||||
service_stop /usr/sbin/portmap
|
||||
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_set_param command /usr/sbin/portmap -f
|
||||
procd_close_instance
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user