Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 363913 - sys-apps/hdparm: config file (/etc/conf.d/hdparm) does not provide a mechanism to run hdparm on a device named other than /dev/sd*
Summary: sys-apps/hdparm: config file (/etc/conf.d/hdparm) does not provide a mechanis...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-17 12:15 UTC by optiluca@gmail.com
Modified: 2011-04-20 06:44 UTC (History)
0 users

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 optiluca@gmail.com 2011-04-17 12:15:57 UTC
Hi.  I have an external drive which, depending when it gets plugged in, can be one of sdb/sdc etc. etc.  Because of this, I have written a udev rule which creates the more predictable /dev/drive symlink.

I want to change some settings on said drive, and running hdparm "stuff" /dev/drive works just fine.  However, I have not been successful in getting the init script to work via the symlink, eg:

drive_args="stuff"

does not work, but 

sdX_args="stuff" does.

I have looked in the init.d file, and the commented section describes loads of folders which I do not have.  Is the init script obsolete?

BTW, I am running a ~amd64 install, with everything up to date (openrc-0.8.2, hdparm-9.37)

Reproducible: Always

Steps to Reproduce:
1. add drive_args="-B 100" to /etc/conf.d/hdparm file
2. restart init script

Actual Results:  
nothing happens

Expected Results:  
hdparm is run on /dev/drive

emerge --info
Portage 2.2.0_alpha30 (default/linux/amd64/10.0/desktop/kde, gcc-4.5.2, glibc-2.13-r2, 2.6.38-gentoo-r2 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_820_@_1.73GHz-with-gentoo-2.0.2
Timestamp of tree: Sun, 17 Apr 2011 09:30:01 +0000
app-shells/bash:     4.2_p8
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1
dev-util/cmake:      2.8.4
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2
sys-apps/sandbox:    2.5
sys-devel/autoconf:  2.13, 2.68
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1-r1
sys-devel/binutils:  2.21
sys-devel/gcc:       4.5.2
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.4-r1
sys-devel/make:      3.82
sys-kernel/linux-headers: 2.6.38
virtual/os-headers:  0
Repositories: gentoo multimedia sunrise ikelos LOCAL
Installed sets: 
ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
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"
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.2/ext-active/ /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.2/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.2/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /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="/etc/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.jamit.de/gentoo/ ftp://mirror.switch.ch/mirror/gentoo/"
LANG="en_GB.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-O1"
LINGUAS="en_GB it"
MAKEOPTS="-j8"
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="/var/lib/layman/multimedia /var/lib/layman/sunrise /var/lib/layman/ikelos /usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac acl acpi alsa amd64 amr apm avi bash-completion berkdb bluetooth branding bzip2 cairo caps cdaudio cddb cdr chm cleartype cli consolekit cracklib crypt css cups cxx dbus dhcp dri dts dv dvb dvd dvdr dvdread editor emboss emovix encode exif faac faad fam fame fbcondecor fbsplash ffmpeg firefox flac foomaticdb fortran gcj gd gdbm gdu gif git glitz glx gphoto2 gpm gps gstreamer hdaps iconv id3tag ieee1394 imagemagick inotify ipod ipv6 it jack java java6 joystick jpeg kde kickoff ladspa lastfm lcms ldap libnotify libsamplerate lm_sensors mad mbrola mikmod mmx mng modules mp2 mp3 mp4 mpeg mplayer msn mudflap multilib musicbrainz ncurses nls nptl nptlonly nsplugin nvidia ogg opengl openmp pam pango pcre pdf perl phonon pmu png policykit ppds pppd python qt qt3support qt4 quicktime readline rtc samba scanner sdl semantic-desktop session skype slp smp snmp spell sse sse2 sse3 ssl ssse3 startup-notification subtitles subversion svg sysfs tcpd theora threads tiff truetype twolame udev unicode usb v4l v4l2 vdpau vorbis wicd wifi x264 xcomposite xine xml xorg xulrunner xv xvid zeroconf zlib" ALSA_CARDS="hda-intel" 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" CAMERAS="ptp2" 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="evdev joystick synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en_GB it" PHP_TARGETS="php5-3 php5-2" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 SpanKY gentoo-dev 2011-04-20 06:44:35 UTC
hdparm is good for static devices at boot time.  if you want to run on dynamic stuff, i suggest you extend your existing udev rules to manually execute hdparm with the options you desire.  then you wont need static naming at all.