ziproxy executable does not parse all options after the "--" in the init script. Reproducible: Always Steps to Reproduce: 1. Modify /etc/conf.d/ziproxy by uncommenting out the "CONFIG" variable 2. Attempt to start ziproxy 3. The init system will think that ziproxy started when it actually did not. Actual Results: The init system tries to run the following command: # ziproxy -- -d -c /etc/ziproxy/ziproxy.conf It is required to define either 'daemon mode' or 'inetd mode' Call `ziproxy --help` for a list of available parameters with their syntax. Expected Results: The init system should run the following command: # ziproxy -d -c /etc/ziproxy/ziproxy.conf <PID of started process> # # emerge --info Portage 2.1.4.4 (default-linux/amd64/2007.0/desktop, gcc-4.2.3, glibc-2.7-r1, 2.6.20-gentoo-r3 x86_64) ================================================================= System uname: 2.6.20-gentoo-r3 x86_64 AMD Athlon(tm) 64 X2 Dual Core Processor 4200+ Timestamp of tree: Fri, 21 Mar 2008 15:48:01 +0000 app-shells/bash: 3.2_p33 dev-java/java-config: 1.3.7, 2.1.5 dev-lang/python: 2.4.4-r4, 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 sys-apps/baselayout: 1.12.11.1 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61-r1 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1 sys-devel/binutils: 2.18-r1 sys-devel/gcc-config: 1.4.0-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.24 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -funroll-loops" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/4.0/env /usr/kde/4.0/share/config /usr/kde/4.0/shutdown /usr/share/config" CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d" CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -funroll-loops" DISTDIR="/usr/portage/distfiles" FEATURES="ccache distlocks metadata-transfer multilib-strict sandbox sfperms strict unmerge-orphans userfetch" GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo" LINGUAS="en_US" MAKEOPTS="-j4" PKGDIR="/usr/portage/packages" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/portage/local/layman/arcon /usr/portage/local/layman/science /usr/portage/local/layman/sunrise /usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="4 X Xaw3d accessibility acl acpi aiglx alsa amd64 apache2 arts bash-completion bitmap-fonts blender-game bluetooth branding browserplugin bzip2 cairo cdinstall cdr cisco cli contentcache cracklib crypt css ctype cups curl curlwrappers cvs cxx dba dbus deprecated disassembler discouraged divx draw-harness dri dvd dvdr dvdread eds elisp emboss emovix encode esd evo extra-algorithms fam ffmpeg firefox flash fortran fping ftp gcj gd gdbm gif gimp glibc-omitfp glitz gnome gpm graphviz gs gstreamer gtk gtk2 hal hdf5 hybrid-auth iconv imagemagick inode ipod ipv6 isdnlog java jpeg kde kerberos ldap logrotate lucene mad mbrola midi mikmod mjpeg mmx mono mozbranding mp3 mp4 mpeg mpi mplayer mplayer-bin mudflap mysql ncurses networking networkmanager nls nptl nptlonly nsplugin nvidia ocaml ogg opengl openmp oss pam pascal pcntl pcre pda pdf perl php png posix postgres ppds pppd pvfs2 python qt qt3 qt3support qt4 quicktime readline realmedia reflection regex ruby samba sdl session smartcard sockets sound sox speex spell spl sql sse sse2 ssl subtitles subversion svg tcpd threads tiff truetype truetype-fonts type1-fonts unicode usb userlocales vcd vidcap visualization vorbis weak-algorithms wmf wmp wok xcomposite xine xinerama xml xml2 xmlrpc xorg xv xvid zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_US" USERLAND="GNU" VIDEO_CARDS="nvidia nv" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
thanks for reporting. I'll check it asap.
hmmm.... > The init system tries to run the following command: > # ziproxy -- -d -c /etc/ziproxy/ziproxy.conf well, then 'start-stop-daemon' has a bug (which I don't believe). look at the init-script: start-stop-daemon --quiet --start --pidfile /var/run/${myservice}.pid --chuid ziproxy:ziproxy --exec /usr/sbin/ziproxy -- ${OPT} > /var/run/${myservice}.pid as you can see, -- terminates the start-stop-daemon command line. start-stop-daemon *should* run this afterwards: /usr/sbin/ziproxy ${OPT} and not /usr/sbin/ziproxy -- ${OPT} at least it did in the past. somewhat strange!
ok, I can *not* reproduce it! #~ /etc/init.d/ziproxy start * Starting ziproxy ... [ ok ] #~ ps auxw|grep ziproxy ziproxy 10802 0.0 0.0 2644 352 ? Ss 22:41 0:00 /usr/sbin/ziproxy -d #~ cat /var/run/ziproxy.pid 10802 looks perfect! but, hmmmm.... CFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -funroll-loops" CXXFLAGS="-march=athlon64 -O3 -pipe -fomit-frame-pointer -funroll-loops" can you please try to compile it with -O2 and w/o -funroll-loops. just for testing? Also sys-apps/baselayout (which includes start-stop-daemon).
ahh, well, also with CONFIG= enabled: #~ ps auxw|grep ziproxy ziproxy 11275 0.0 0.0 2640 352 ? Ss 22:51 0:00 /usr/sbin/ziproxy -d -c /etc/ziproxy/ziproxy.conf
Sorry about that, I was having quite an off day when I filed the bug. Anyways, here's what's going on with me: # /etc/init.d/ziproxy start * Caching service dependencies ... [ ok ] * Starting ziproxy ... [ !! ] Uh oh! For some reason, it didn't start :(. But I can start it manually! # ziproxy -d -c /etc/ziproxy/ziproxy.conf 17362 # ps -A | grep zip 17362 ? 00:00:00 ziproxy Maybe it has something to do with the user/group? Let's see what happens if I just let it run as root (internal network- not worried about security on this machine) (removing --chuid ziproxy:ziproxy from /etc/init.d/ziproxy). # /etc/init.d/ziproxy start * Caching service dependencies ... [ ok ] * Starting ziproxy ... [ ok ] amd64-1 ~ # ps -A | grep zip 18011 ? 00:00:00 ziproxy It looks like ziproxy only likes root :-o.
well, please check the permissions of: /etc/ziproxy/* /var/log/ziproxy/
# ls -la /etc/ziproxy/ziproxy.conf -rw-r--r-- 1 root root 25447 Mar 24 04:13 /etc/ziproxy/ziproxy.conf # ls -la /var/log/ziproxy total 1 drwxr-x--- 2 hsqldb hsqldb 96 May 14 21:18 . hsqldb? Huh? # chown ziproxy:ziproxy -R /var/log/ziproxy # /etc/init.d/ziproxy start * Caching service dependencies ... [ ok ] * Starting ziproxy ... [ ok ] # pgrep ziproxy 18169 # That looks like it. Now why in the world did /var/log/ziproxy get changed to hsqldb ownership?
I don't know. But please ty: > id hsqldb and then > id ziproxy but if something runs as root but not as (the intended) user, in most cases the permissions are wrong somehow. I will close the bug now.