Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 329763 - app-admin/hddtemp doesn't start if NET services isn't started
Summary: app-admin/hddtemp doesn't start if NET services isn't started
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: High minor (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-25 05:09 UTC by Rafael Umbelino
Modified: 2011-06-12 13:19 UTC (History)
0 users

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


Attachments
Patch that corrects this bug. Simply remove net from the dependencies of the service. (hddtemp.patch,50 bytes, patch)
2010-07-25 05:21 UTC, Rafael Umbelino
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Umbelino 2010-07-25 05:09:27 UTC
I noticed that when booting Linux without an internet connection, app-admin/hddtemp won't start as it depends on net services.
Althought HDDTemp can be used through network to catch the status of a hard drive in a remote server, users monitoring their own hard drive that want to use it will have to have an net service working.
Also, somebody could want to use HDDTemp without using internet connection even if he have a working connection. Let's suppose that user want to use HDDTemp (which acctualy depends on started NET services) on a laptop in a place without internet connection. As he tries to start HDDTemp, HDDTemp will trigger NET services. Those will not work as he doesn't have/want an internet connection that moment and then HDDTemp fails to start.


As is the /etc/init.d/hddtemp


depend() {
        need localmount net
}

I would suggest to change this to only "need localmount". This way, users using HDDTemp without NET services started can start HDDTemp service.

Reproducible: Always

Steps to Reproduce:
1. Emerge app-admin/hddtemp
2. Unplug network cable from your computer
3. Stop any net.* services that may be running
4. Try to start HDDTemp

Actual Results:  
If net.* can't start (for a not working network card, not working internet connection or non-existant internet connection), HDDTemp fails to start.

Expected Results:  
HDDTemp should started correctly, as it doesn't depends on internet connection, althought it can be used remotely.

[ebuild   R   ] app-admin/hddtemp-0.3_beta15-r3  USE="nls" 0 kB

rafael@AirBus ~ $ emerge --info
Portage 2.1.8.3 (default/linux/amd64/10.0, gcc-4.4.3, glibc-2.11.2-r0, 2.6.32-gentoo-r7 x86_64)
=================================================================
System uname: Linux-2.6.32-gentoo-r7-x86_64-AMD_Phenom-tm-_II_X4_945_Processor-with-gentoo-1.12.13
Timestamp of tree: Sun, 25 Jul 2010 01:00:19 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p37
dev-java/java-config: 2.1.11
dev-lang/python:     2.6.5-r2, 3.1.2-r3
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.65
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.3-r2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=amdfam10 -O2 -pipe -mcx16 -mmmx -msse -msse2 -msse3 -msse4a -m3dnow -mabm -mfpmath=sse -m3dnow"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /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/sandbox.d /etc/terminfo"
CXXFLAGS="-march=amdfam10 -O2 -pipe -mcx16 -mmmx -msse -msse2 -msse3 -msse4a -m3dnow -mabm -mfpmath=sse -m3dnow"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages metadata-transfer multilib-strict news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.c3sl.ufpr.br/ ftp://gentoo.c3sl.ufpr.br/gentoo/ http://www.las.ic.unicamp.br/pub/gentoo/ ftp://ftp.las.ic.unicamp.br/pub/gentoo/ rsync://gentoo.c3sl.ufpr.br/gentoo/ rsync://gentoo.lcc.ufmg.br/gentoo-sources"
LANG="pt_BR.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="pt_BR.UTF-8 pt_BR.ISO8859-1 pt_BR.iso8859-1 pt_BR pt-BR"
MAKEOPTS="-j4"
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"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext X aac acl acpi alsa amd64 apm aspell atm automount bash-completion berkdb bzip2 cairo caps cdda cddb cdr cleartype cli consolekit cracklib crypt css cups cxx dbus device-mapper dga dhcp dhcpcd dri dvd dvdrexif emerald extras fam ffmpeg flac fontconfig fortran ftp gcj gdbm gdu gif gmplayer gnome gnutls gpm gstreamer gtk gtkhtml gzip hal hddtemp iconv icu imap inifile java java6 javascript jpeg lame latex libgda libnotify lm_sensors lzo mad matroska matrox mime mmx mmxext mns modules mp3 mp4 mplayer mudflap multilib nas nautilus ncurses networkmanager nls nptl nptlonly nsplugin nss ogg opengl openmp pam pcre pdf perl php pmu png policykit posix pppd profile pulseaudio python quicktime readline reflection rss ruby sdl session smp sockets spell spl sqlite sqlite3 sse sse2 sse3 sse4 sse4a ssl startup-notification svg sysfs syslog sysvipc tcl tcpd theora threads thunar tiff timidity tk truetype unicode usb vbd vorbis webkit x264 xcb xcomposite xine xinerama xorg xpm xscreensaver xv 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 mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="pt_BR.UTF-8 pt_BR.ISO8859-1 pt_BR.iso8859-1 pt_BR pt-BR" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="fbdev glint intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa via vmware voodoo" 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, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Rafael Umbelino 2010-07-25 05:21:19 UTC
Created attachment 240079 [details, diff]
Patch that corrects this bug. Simply remove net from the dependencies of the service.

Just made a patch to correct the problem.
It simply removes the word "net" from the file, so HDDTemp service start even if it doesn't have a started NET service.
Comment 2 Michal Januszewski (RETIRED) gentoo-dev 2010-07-25 20:52:35 UTC
The hddtemp daemon requires some net interface to be up and running.  For local monitoring, net.lo will suffice here. Have you considered setting RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc instead of modifying the dependencies of hddtemp service?
Comment 3 Rafael Umbelino 2010-07-25 22:01:00 UTC
(In reply to comment #2)
> The hddtemp daemon requires some net interface to be up and running.  For local
> monitoring, net.lo will suffice here. Have you considered setting
> RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc instead of modifying the
> dependencies of hddtemp service?
> 

Are you sure it needs? I tried to use HDDTemp without net.lo and net.eth0 services started and it worked just fine. Didn't considerated to set RC_NET_STRICT_CHECK to "lo" at first place, I'll check it out also.

But still HDDTemp works without any net.* service started, so it just doesn't seen to need net service at all to run.
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2010-07-26 22:28:04 UTC
(In reply to comment #3)

> Are you sure it needs? I tried to use HDDTemp without net.lo and net.eth0
> services started and it worked just fine. Didn't considerated to set
> RC_NET_STRICT_CHECK to "lo" at first place, I'll check it out also.
> 
> But still HDDTemp works without any net.* service started, so it just doesn't
> seen to need net service at all to run.

It will _start_, but it won't actually work unless the lo interface is up.   Try to run `nc 127.0.0.1 7634` after a normal boot with net.lo started (you should see info about the hdd temperatures), then down the lo interface (ifconfig lo down) and try again.

Comment 5 Rafael Umbelino 2010-07-31 02:29:12 UTC
(In reply to comment #4)
> (In reply to comment #3)
> 
> > Are you sure it needs? I tried to use HDDTemp without net.lo and net.eth0
> > services started and it worked just fine. Didn't considerated to set
> > RC_NET_STRICT_CHECK to "lo" at first place, I'll check it out also.
> > 
> > But still HDDTemp works without any net.* service started, so it just doesn't
> > seen to need net service at all to run.
> 
> It will _start_, but it won't actually work unless the lo interface is up.  
> Try to run `nc 127.0.0.1 7634` after a normal boot with net.lo started (you
> should see info about the hdd temperatures), then down the lo interface
> (ifconfig lo down) and try again.
> 

Tried and it's correct.
So it runs well if net.lo is up, but net.eth0 still is useless for a standalone machine.
There wasn't a way to add only net.lo to dependency of hddtemp?
Comment 6 Michael Perlov 2010-09-13 16:25:29 UTC
(In reply to comment #2)
> The hddtemp daemon requires some net interface to be up and running.  For local
> monitoring, net.lo will suffice here. Have you considered setting
> RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc instead of modifying the
> dependencies of hddtemp service?
> 

There are no RC_NET_STRICT_CHECKING option for openrc, isn't it?
I have the same trouble on baselayout2+openrc, any advices?
Comment 7 Michael Perlov 2010-09-13 18:12:30 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > The hddtemp daemon requires some net interface to be up and running.  For local
> > monitoring, net.lo will suffice here. Have you considered setting
> > RC_NET_STRICT_CHECKING="lo" in /etc/conf.d/rc instead of modifying the
> > dependencies of hddtemp service?
> > 
> 
> There are no RC_NET_STRICT_CHECKING option for openrc, isn't it?
> I have the same trouble on baselayout2+openrc, any advices?
> 

It seems, that rc_depend_strict="NO" in /etc/rc.conf do the trick.
Comment 8 Michal Januszewski (RETIRED) gentoo-dev 2011-06-12 13:19:47 UTC
I added some info messages about rc_depend_strict to the ebuild.  Closing.