Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Evergreen:11.1:Test
privoxy
privoxy-3.0.10-init.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File privoxy-3.0.10-init.patch of Package privoxy
--- privoxy-3.0.9-beta/privoxy.init.suse +++ privoxy-3.0.9-beta/privoxy.init.suse @@ -76,9 +76,10 @@ ### BEGIN INIT INFO # Provides: privoxy # Required-Start: $network $syslog $remote_fs -# Required-Stop: +# Required-Stop: $remote_fs $local_fs # Default-Start: 3 5 # Default-Stop: 0 1 2 6 +# Short-Description: Starts Privoxy # Description: Starts Privoxy ### END INIT INFO @@ -89,7 +90,19 @@ start) echo -n "Starting Privoxy" if [ ! -f /var/run/privoxy.pid ] || ! kill -0 `cat /var/run/privoxy.pid` 2> /dev/null; then - /usr/sbin/privoxy --user privoxy.privoxy --pidfile /var/run/privoxy.pid /etc/privoxy/config 2> /dev/null + # set up chroot dir + for i in /etc/{resolv.conf,host.conf,hosts,localtime}; do + cp -p $i /var/lib/privoxy/etc/ &>/dev/null \ + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + done + libdir=/$(basename $(echo /var/lib/privoxy/lib*)) + for i in /$libdir/{libresolv.so.2,libnss_dns{,6}.so.2}; do + if [ -s $i ]; then + cp -p $i /var/lib/privoxy/$libdir/ \ + || { echo "...$0:$LINENO: could not copy $i to chroot jail"; rc_failed; rc_status -v1; exit 6; } + fi + done + /usr/sbin/privoxy --user privoxy.privoxy --pidfile /var/run/privoxy.pid --chroot /etc/config 2> /dev/null else false fi @@ -98,6 +111,11 @@ stop) echo -n "Shutting down Privoxy" killproc -TERM /usr/sbin/privoxy && rm -f /var/run/privoxy.pid + + # remove libraries from the chroot jail, just so they are not left over + # if the server is deinstalled + rm -f /var/lib/privoxy/lib*/* + rc_status -v ;; reload) @@ -106,7 +124,7 @@ rc_status -v ;; try-restart) - $0 stop && $0 start + $0 status >/dev/null && $0 restart rc_status ;; restart)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor