portmap: switch to new procd init script style and create and use the "rpc" user...
authorPeter Wagner <​tripolar@gmx.at>
Mon, 23 Sep 2013 10:11:17 +0000 (10:11 +0000)
committerPeter Wagner <​tripolar@gmx.at>
Mon, 23 Sep 2013 10:11:17 +0000 (10:11 +0000)
Signed-off-by: Peter Wagner <tripolar@gmx.at>
SVN-Revision: 38134

net/portmap/Makefile
net/portmap/files/portmap.init

index baae0aa6588b5d66f2bffcac143ed1c5255435a5..c1cf452d3c28250136b72e8e11bc67a3432b31b1 100644 (file)
@@ -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
 
index e73701c8e275be34afa8b28f540e9086cb619f84..e3e27b7ede35b69379360cce84def09551519865 100644 (file)
@@ -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
 }