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
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() {
#!/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 ] || {
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
-}