Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 481640 - net-misc/tinc-1.0.22 with SYSLOG="yes" in tincd.conf - /usr/sbin/tincd: unrecognized argument ''
Summary: net-misc/tinc-1.0.22 with SYSLOG="yes" in tincd.conf - /usr/sbin/tincd: unrec...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-19 13:08 UTC by Matteo Modesti
Modified: 2013-09-01 12:24 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Modesti 2013-08-19 13:08:51 UTC
The last net-misc/tinc update set SYSLOG="yes" in my /etc/conf.d/tincd without me noticing (don't know why, don't ask :P).
Today I tried to start tincd but it wouldn't, printing "unrecognized argument ''". I played a bit with /etc/init.d/tincd echo-ing some command lines and var values and discovered the problem in these lines:


if [ "${SYSLOG}" == "yes" ]; then
    LOG=""
else
    LOG="--logfile=/var/log/tinc.${NETNAME}.log"
fi
start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" "${LOG}" --pidfile "${PIDFILE}"


In fact, if you remove the enclosing double-quotes from LOG in the last line (so "${LOG}" becomes ${LOG}) it starts with no problem, since there are no more empty parameters, only useless spaces.

Right now I set SYSLOG="no" and reset /etc/init.d/tincd so it works for me, but it'd be better if this problem were to be fixed, considering that it'd probably take very few time.

Reproducible: Always

Steps to Reproduce:
1. Emerge net-misc/tinc
2. Add an auto-loading network in /etc/conf.d/tinc.networks
3. Set SYSLOG="yes" in /etc/conf.d/tincd
4. rc-config start tincd
Actual Results:  
# rc-config start tincd
Starting init script
 * Starting tinc VPN networks ...
 * Starting tinc network my_autoloaded_network_name ...
/usr/sbin/tincd: unrecognized argument ''
Try `/usr/sbin/tincd --help' for more information.
 * start-stop-daemon: failed to start `/usr/sbin/tincd'
 * ERROR: tincd failed to start

Expected Results:  
# rc-config start tincd
Starting init script
 * Starting tinc VPN networks ...
 * Starting tinc network my_autoloaded_network_name ...

# emerge --info
Portage 2.2.0 (default/linux/amd64/13.0, gcc-4.6.3, glibc-2.15-r3, 3.8.13-gentoo x86_64)
=================================================================
System uname: Linux-3.8.13-gentoo-x86_64-AMD_FX-tm-6300_Six-Core_Processor-with-gentoo-2.2
KiB Mem:    16348460 total,    797908 free
KiB Swap:   41945708 total,  41944040 free
Timestamp of tree: Mon, 19 Aug 2013 10:15:01 +0000
ld ld di GNU (GNU Binutils) 2.23.1
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.5, 3.2.5-r1
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.10.3, 1.11.6, 1.12.6
sys-devel/binutils:       2.23.1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.7 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo pentoo nektoo
Installed sets: @system
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA PUEL dlj-1.1 AdobeFlash-11.x skype-4.0.0.7-copyright"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gd.tuwien.ac.at/opsys/linux/gentoo/"
LANG="it_IT.UTF-8"
LC_ALL="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/pentoo /var/lib/layman/nektoo"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext 3ds 64bit X Xaw3d a52 aac ace acl acpi additions aio akode alsa amd64 ao apache2 apng audacious audiofile autoreplace bash-completion berkdb branding bzip2 cairo cal3d caps ccache cdda cddb cdio cdparanoia cdr chardet chroot cli consolekit cracklib crypt css cups curl cxx dbus dga dirac directfb djvu double-precision dri dts dv dvb dvd dvdr ecc emovix enca encode exif expat fam fame fbcon fbdev ffmpeg fftw firefox flac flash fontconfig fortran fpx ftp gcj gd gdbm ggi gif gimp glib glitz glut gmp gnutls gpm graphviz gs gtk gtkhtml guile gzip hdri history hwdb iconv icu id3 id3tag idea imagemagick imlib inkjar ipv6 jabber java5 java6 javascript jbig jpeg jpeg2k justify kde kdrive ladspa lame lcms libcaca libffi libkms libnotify libsamplerate loop-aes lzma lzo mad matroska md5sum mikmod mime mjpeg mmap mmx mmxext mng modplug modules mono moonlight motif mozdom mp2 mp3 mp4 mpeg mplayer msn mudflap multilib musepack musicbrainz ncurses networking nls nptl nsplugin ntlm nuv oav objc objc++ objc-gc odk offensive ogg openal openexr opengl openmp openssl optimized-qmake osmesa pam pcre pdf physfs plasma pm-utils png postproc ppds pth qt3 qt3support qt4 quicktime radio rar readline replytolist rtc rtsp schroedinger scrobbler sdl sdl-image sdl-sound sdlaudio semantic-desktop sensord session shared-dricore shout slang slp smp sms sndfile sockets speex spell srp srt sse sse2 sse3 ssl static-libs stream svg sysfs syslog szip t1lib tcpd tga theora threads tidy tiff toolbar truetype tta udev unicode unzip upnp usb utempter v4l v4l2 vcd vdr vlc vorbis wav wavpack webkit winbind wma wmf x264 xanim xforms xine xml xnest xpm xprint xsl xulrunner xv xvid xvmc yv12 zip zlib" ABI_X86="64" ALSA_CARDS="ca0106" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_core authn_dbd authn_dbm authn_default authn_file authz_core 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 lbmethod_byrequests log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif slotmem_shm socache_shmcb speling status unique_id unixd userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" DVB_CARDS="usb-dib0700" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it" NETBEANS_MODULES="cnd php" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" SANE_BACKENDS="epson epson2" USERLAND="GNU" VIDEO_CARDS="fglrx radeon radeonhd fbdev" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 MeikoDis 2013-09-01 00:00:34 UTC
The OpenRC script has got a little bug.

Solution: 

Change
start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" "${LOG}" --pidfile "${PIDFILE}"

to
start-stop-daemon --start --exec "${DAEMON}" --pidfile "${PIDFILE}" -- --net="${NETNAME}" ${LOG} --pidfile "${PIDFILE}"


MeikoDis
Comment 2 MeikoDis 2013-09-01 00:11:17 UTC
...well I should read before. :p
Comment 3 Anthony Basile gentoo-dev 2013-09-01 11:59:39 UTC
(In reply to MeikoDis from comment #2)
> ...well I should read before. :p

I'm confuse with this comment and your solution in comment #1.  Are you saying I should remove the quotes around ${LOG} ?  Why does this cause a problem?
Comment 4 Matteo Modesti 2013-09-01 12:12:47 UTC
(In reply to Anthony Basile from comment #3)
> (In reply to MeikoDis from comment #2)
> > ...well I should read before. :p
> 
> I'm confuse with this comment and your solution in comment #1.  Are you
> saying I should remove the quotes around ${LOG} ?  Why does this cause a
> problem?

Comment #2 was probably because he didn't see I had already proposed that solution.

That said, when "${SYSLOG}" == "yes" the script assigns LOG="", so "${LOG}" evaluates to "" (empty string) and not  (nothing/void). Since "empty string" is not a valid parameter it stops with error... or at least I think that's the problem.
Comment 5 Anthony Basile gentoo-dev 2013-09-01 12:24:26 UTC
(In reply to Matteo Modesti from comment #4)
> (In reply to Anthony Basile from comment #3)
> > (In reply to MeikoDis from comment #2)
> > > ...well I should read before. :p
> > 
> > I'm confuse with this comment and your solution in comment #1.  Are you
> > saying I should remove the quotes around ${LOG} ?  Why does this cause a
> > problem?
> 
> Comment #2 was probably because he didn't see I had already proposed that
> solution.
> 
> That said, when "${SYSLOG}" == "yes" the script assigns LOG="", so "${LOG}"
> evaluates to "" (empty string) and not  (nothing/void). Since "empty string"
> is not a valid parameter it stops with error... or at least I think that's
> the problem.

Ah thanks!  I see it now.  Its fixed in the tree.