From 27e9a415b1b0c8d45ea9c0cd46db346221dfe49a Mon Sep 17 00:00:00 2001 From: tripolar Date: Sun, 22 Sep 2013 17:41:58 +0000 Subject: [PATCH] [packages] openssh,pulseaudio: switch to new procd init script style Signed-off-by: Peter Wagner git-svn-id: svn://svn.openwrt.org/openwrt/packages@38122 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/openssh/Makefile | 2 +- net/openssh/files/sshd.init | 12 ++++++------ sound/pulseaudio/Makefile | 2 +- sound/pulseaudio/files/pulseaudio.init | 18 +++++++++--------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/net/openssh/Makefile b/net/openssh/Makefile index 3118655cf..a61220596 100644 --- a/net/openssh/Makefile +++ b/net/openssh/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=openssh PKG_VERSION:=6.2p2 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ diff --git a/net/openssh/files/sshd.init b/net/openssh/files/sshd.init index ecc44c39e..879df12cd 100644 --- a/net/openssh/files/sshd.init +++ b/net/openssh/files/sshd.init @@ -4,9 +4,10 @@ START=50 STOP=50 -SERVICE_USE_PID=1 +USE_PROCD=1 +PROG=/usr/sbin/sshd -start() { +start_service() { for type in rsa dsa; do { # check for keys key=/etc/ssh/ssh_host_${type}_key @@ -20,11 +21,10 @@ start() { 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 - service_start /usr/sbin/sshd -} -stop() { - service_stop /usr/sbin/sshd + procd_open_instance + procd_set_param command $PROG -D + procd_close_instance } shutdown() { diff --git a/sound/pulseaudio/Makefile b/sound/pulseaudio/Makefile index 467b2b7e1..13996f574 100644 --- a/sound/pulseaudio/Makefile +++ b/sound/pulseaudio/Makefile @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pulseaudio PKG_VERSION:=4.0 -PKG_RELEASE:=3 +PKG_RELEASE:=4 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=http://freedesktop.org/software/pulseaudio/releases/ diff --git a/sound/pulseaudio/files/pulseaudio.init b/sound/pulseaudio/files/pulseaudio.init index 6ad6af3c0..4dbc5ecf5 100644 --- a/sound/pulseaudio/files/pulseaudio.init +++ b/sound/pulseaudio/files/pulseaudio.init @@ -1,13 +1,13 @@ #!/bin/sh /etc/rc.common # Copyright (C) 2011 OpenWrt.org -START=65 -STOP=65 +START=99 +STOP=60 -SERVICE_USE_PID=1 -SERVICE_PID_FILE=/var/run/pulse/pid +USE_PROCD=1 +PROG=/usr/bin/pulseaudio -start() { +start_service() { user_exists pulse 51 || user_add pulse 51 group_exists pulse 51 || group_add pulse 51 [ -d /var/run/pulse ] || { @@ -20,12 +20,12 @@ start() { chmod 0750 /var/lib/pulse chown pulse:pulse /var/lib/pulse } + chown root:pulse /dev/snd/* /dev/mixer /dev/dsp chmod 664 /dev/snd/* /dev/mixer /dev/dsp - service_start /usr/bin/pulseaudio --daemonize --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 + procd_open_instance + procd_set_param command $PROG --system --disallow-exit --disallow-module-loading --disable-shm --exit-idle-time=-1 --realtime=false + procd_close_instance } -stop() { - service_stop /usr/bin/pulseaudio -} -- 2.11.0