Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 349628

Summary: sys-apps/openrc-0.6.8: /sbin/rc-service: invalid option -- 'D' when starting net.eth0
Product: Gentoo Linux Reporter: Martin Mokrejš <mmokrejs>
Component: [OLD] baselayoutAssignee: OpenRC Team <openrc>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: stop.txt
start.txt

Description Martin Mokrejš 2010-12-24 16:50:33 UTC
I am not sure this is really a dbus issue, but take is as a first guess. Second guess would be sys-apps/openrc-0.6.7 to 0.6.8 update. A nice xmas gift from todays portage update anyways. :(

# /etc/init.d/net.eth0 stop
 * Bringing down interface eth0
Usage: rc-service [options] 

Options: [e:ilr:Chqv]
  -e, --exists <arg>                tests if the service exists or not
  -i, --ifexists                    if the service exsits then run the command
  -l, --list                        list all available services
  -r, --resolve <arg>               resolve the service name to an init script
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly
#


No, cannot be openrc-0.6.8 issue, after downgrade to 0.6.7 I get:

#  /etc/init.d/net.eth0 start
 * Bringing up interface eth0
 *   Caching network module dependencies
/sbin/rc-service: invalid option -- 'D'
Usage: rc-service [options] 

Options: [e:ilr:Chqv]
  -e, --exists <arg>                tests if the service exists or not
  -i, --ifexists                    if the service exsits then run the command
  -l, --list                        list all available services
  -r, --resolve <arg>               resolve the service name to an init script
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly
 *   192.168.0.2/24 ...                                                                                                                                                                                                      [ ok ]
 *   Adding routes
#


Hmm, and the dbus-1.4.0 is gone from the tree. Please let me know if you need to know more.


# emerge --info
Portage 2.1.9.26 (default/linux/x86/10.0/desktop, gcc-4.5.1, glibc-2.12.1-r3, 2.6.27.57 i686)
=================================================================
System uname: Linux-2.6.27.57-i686-Mobile_Intel-R-_Pentium-R-_4_-_M_CPU_1.80GHz-with-gentoo-2.0.1
Timestamp of tree: Thu, 23 Dec 2010 09:15:01 +0000
distcc 3.1 i686-pc-linux-gnu [enabled]
app-shells/bash:     4.1_p9
dev-java/java-config: 1.3.7-r1, 2.1.11-r3
dev-lang/python:     2.5.4-r4, 2.6.6-r1, 2.7.1, 3.1.3
dev-util/cmake:      2.8.1-r2
sys-apps/baselayout: 2.0.1-r1
sys-apps/openrc:     0.6.8
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13::<unknown repository>, 2.68
sys-devel/automake:  1.4_p6-r1, 1.5-r1, 1.6.3-r1, 1.7.9-r2, 1.8.5-r4, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.21
sys-devel/gcc:       3.3.6-r1, 4.2.4-r1, 4.3.5, 4.4.5, 4.5.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.81-r2
virtual/os-headers:  2.6.36.1 (sys-kernel/linux-headers)
ACCEPT_KEYWORDS="x86 ~x86"
ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Nero-EULA-US skype-eula AdobeFlash AdobeFlash-10 AdobeFlash-10.1"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -mmmx -msse -msse2 -pipe -fno-strict-aliasing -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/openvpn/easy-rsa /var/bind /var/lib/hsqldb /var/qmail/alias /var/qmail/control /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/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="-O2 -march=pentium4 -mmmx -msse -msse2 -pipe -fno-strict-aliasing -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distcc distlocks fixlafiles fixpackages metadata-transfer news nostrip parallel-fetch protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.mirror.web4u.cz"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en cs cz"
MAKEOPTS="-j6"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
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/local/portage /home/mmokrejs/proj/sci"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="32bit 7zip R X Xaw3d a52 aac aalib ace acl acpi alsa amr amrnb amrwb apache audacious audiofile bash-completion bcmath berkdb blas bluetooth boost branding bzip2 cairo caps cblas cddb cdparanoia cdr cgi clamav cli colordiff compress consolekit cpio cracklib crypt cscope css ctype cups curl curlwrappers cxx dbi dbus dga dia directfb djbfft dri dts dv dvb dvd dvdr dvdread emboss emf enblend encode enscript exif expat faad fam fame fat fbcon ffmpeg fftw firefox flac flash fontconfig fortran fpx ftp gcj gd gdbm gdu ggi gif gimp gimpprint glibc-compat20 glibc-omitfp glut gmp gnuplot gnutls gpgme gphoto2 gpm graphviz gs gsl gsm gtk gtkhtml hal hdf hdf5 hp2xx i8x0 icc iconv icu id3 id3tag ieee1394 imagemagick imlib inifile innodb ithreads jack java javascript jbig jce jikes jpeg jpeg2k kdtree kerberos ladspa lame lapack laptop lcms leim libcaca libnotify libwww live lzo lzw mad maildir matroska mhash mikmod mime ming mjpeg mmap mmx mng mod_python modperl modplug modules motif mozilla moznoirc mp2 mp3 mp4 mpeg mpi mpi_njtree mpich2 mplayer mudflap mule musepack mxdatetime mysql mysqli nat ncurses netcdf netpbm network nls nntp nptl nptlonly nsplugin ntfs numeric objc ogg opengl openmp openssl pam pango pcmcia pcntl pcre pdf perl plotutils plugin png pnm policykit postproc postscript ppds pppd procmail pymol python qt3support qt4 quicktime rar raw readline recode reiserfs romio rpm samba sasl scanner scp sdl seamonkey server session sftp sift slp smime sndfile soap sockets spell sqlite srt sse sse2 ssl startup-notification static-libs subtitles subversion svg svgz sysfs sysvipc t1lib tcl tcpd theora threads tidy tiff tk transcode truetype unicode urandom usb userlocales utils uuencode v4l v4l2 vcd vhook vim-syntax vim-with-x vorbis wavpack wifi win32codecs wmf wxwindows x264 x86 xanim xcb xcf xfs xft xinerama xinetd xml xorg xpm xsl xslt xulrunner xv xvid xvmc yv12 zip zlib" ALSA_CARDS="intel-8x0m" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul 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 cgi cgid dbd deflate dir disk_cache env expires ext_filter file_cache filter headers icu ident imagemap include info log_config mem_cache mime mime_magic rewrite setenvif speling status unique_id userdir usertrack vhost_alias negotiation" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" 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" LINGUAS="en cs cz" PHP_TARGETS="php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="radeon vesa" 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, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Martin Mokrejš 2010-12-24 16:56:06 UTC
Here is what happens if I repeat the upgrade upwards from openrc-0.6.7 to 0.6.8 and run etc-update as requested:

# etc-update
Scanning Configuration files...
The following is the list of files which need updating, each
configuration file is followed by a list of possible replacement files.
1) /etc/init.d/netmount (1)
Please select a file to edit by entering the corresponding number.
              (don't use -3, -5, -7 or -9 if you're unsure what to do)
              (-1 to exit) (-3 to auto merge all remaining files)
                           (-5 to auto-merge AND not use 'mv -i')
                           (-7 to discard all updates)
                           (-9 to discard all updates AND not use 'rm -i'): 

File: /etc/init.d/._cfg0000_netmount
1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
4) Show differences again
5) Save update as example config
Please select from the menu above (-1 to ignore this update): 1
Replacing /etc/init.d/netmount with /etc/init.d/._cfg0000_netmount
mv: overwrite `/etc/init.d/netmount'? y

Exiting: Nothing left to do; exiting. :)
# /etc/init.d/net.eth0 stop
 * Caching service dependencies ...                                                                                                                                                                                             [ ok ]
 * Stopping openvpn.blah...                                                                                                                                                                                                 [ ok ]
 * Bringing down interface eth0
 *   Caching network module dependencies
need dbus
Usage: rc-service [options] 

Options: [e:ilr:Chqv]
  -e, --exists <arg>                tests if the service exists or not
  -i, --ifexists                    if the service exsits then run the command
  -l, --list                        list all available services
  -r, --resolve <arg>               resolve the service name to an init script
  -h, --help                        Display this help output
  -C, --nocolor                     Disable color output
  -v, --verbose                     Run verbosely
  -q, --quiet                       Run quietly
# 
Comment 2 SpanKY gentoo-dev 2010-12-27 16:49:10 UTC
post your /etc/conf.d/net file as an attachment
Comment 3 Martin Mokrejš 2010-12-27 20:59:47 UTC
(In reply to comment #2)
> post your /etc/conf.d/net file as an attachment
> 

Happens when all lines are commented out or when these exist:

config_eth0=( "192.168.0.2/24" )
routes_eth0=("default via 192.168.0.1")
dns_domain_eth0="upc.cz"
dns_servers_eth0="213.46.172.37 213.46.172.36"
dns_search_eth0=""
Comment 4 SpanKY gentoo-dev 2010-12-27 21:04:39 UTC
net.eth0 is a symlink to net.lo right ?  and `qcheck openrc` passes everything ?

run `/etc/init.d/net.eth0 --debug stop` and post the full output as a log
Comment 5 Martin Mokrejš 2010-12-27 21:55:45 UTC
# ls -la /etc/init.d/net*
lrwxrwxrwx 1 root root     6 Apr 18  2008 /etc/init.d/net.eth0 -> net.lo
lrwxrwxrwx 1 root root     6 Jul 19 14:37 /etc/init.d/net.firewire0 -> net.lo
-rwxr-xr-x 1 root root 15143 Dec 24 17:52 /etc/init.d/net.lo
lrwxrwxrwx 1 root root     6 Mar 26  2009 /etc/init.d/net.wlan0 -> net.lo
-rwxr-xr-x 1 root root  2184 Dec 24 17:52 /etc/init.d/netmount
-rwxr-xr-x 1 root root  6805 Dec 24 17:52 /etc/init.d/network
# qcheck openrc
Checking sys-apps/openrc-0.6.8 ...
 AFK: /lib/rc/init.d/.keep_sys-apps_openrc-0
 MTIME: /etc/conf.d/net
 MD5-DIGEST: /etc/rc.conf
  * 289 out of 292 files are good
#

OK, so resolvconf is at fault I think.
Comment 6 Martin Mokrejš 2010-12-27 21:56:46 UTC
Created attachment 258214 [details]
stop.txt
Comment 7 SpanKY gentoo-dev 2010-12-27 21:57:37 UTC

*** This bug has been marked as a duplicate of bug 349180 ***
Comment 8 Martin Mokrejš 2010-12-27 21:57:58 UTC
Created attachment 258216 [details]
start.txt

similarly to the previous attachment, here is the output of

/etc/init.d/net.eth0 --debug start > /tmp/start.txt 2>&1

giving the second type of an error.
Comment 9 Martin Mokrejš 2010-12-27 22:19:57 UTC
Yes, downgrade to =net-dns/openresolv-3.3.4-r1 from 3.4.0 fixed my problems. I did not bother to test the patch, though.