Opened 18 years ago
Closed 18 years ago
#2196 closed defect (fixed)
Error in hdparm instructions
Reported by: | buo | Owned by: | |
---|---|---|---|
Priority: | high | Milestone: | 6.2.0 |
Component: | BOOK | Version: | SVN |
Severity: | major | Keywords: | hdparm |
Cc: |
Description
The hdparm instructions in the current svn book have an interesting bug, which causes a silent failure. See the output of the make install command:
$ make -n binprefix=/usr install if [ ! -z ]; then install -m 755 -d ; fi if [ ! -z /usrsbin ]; then install -m 755 -d /usrsbin ; fi if [ ! -z /usr/share/man ]; then install -m 755 -d /usr/share/man ; fi if [ ! -z /usr/share/man/man8/ ]; then install -m 755 -d /usr/share/man/man8/ ; fi if [ -f /usrsbin/hdparm ]; then rm -f /usrsbin/hdparm ; fi if [ -f /usr/share/man/man8/hdparm.8 ]; then rm -f /usr/share/man/man8/hdparm.8 ;\ elif [ -f /usr/man/man8/hdparm.8 ]; then rm -f /usr/man/man8/hdparm.8 ; fi install -D hdparm /usrsbin/hdparm if [ -d /usr/share/man ]; then install -m 644 -D hdparm.8 /usr/share/man/man8/hdparm.8 ;\ elif [ -d /usr/man ]; then install -m 644 -D hdparm.8 /usr/man/man8/hdparm.8 ; fi
Note the /usrsbin directories. This can be fixed by changing the command to include an extra / after /usr:
$ make -n binprefix=/usr/ install if [ ! -z ]; then install -m 755 -d ; fi if [ ! -z ]; then install -m 755 -d ; fi if [ ! -z /usr/sbin ]; then install -m 755 -d /usr/sbin ; fi if [ ! -z /usr/share/man ]; then install -m 755 -d /usr/share/man ; fi if [ ! -z /usr/share/man/man8/ ]; then install -m 755 -d /usr/share/man/man8/ ; fi if [ -f /usr/sbin/hdparm ]; then rm -f /usr/sbin/hdparm ; fi if [ -f /usr/share/man/man8/hdparm.8 ]; then rm -f /usr/share/man/man8/hdparm.8 ;\ elif [ -f /usr/man/man8/hdparm.8 ]; then rm -f /usr/man/man8/hdparm.8 ; fi install -D hdparm /usr/sbin/hdparm if [ -d /usr/share/man ]; then install -m 644 -D hdparm.8 /usr/share/man/man8/hdparm.8 ;\ elif [ -d /usr/man ]; then install -m 644 -D hdparm.8 /usr/man/man8/hdparm.8 ; fi
I guess this is an error with hdparm's install system, but it's easy to fix in the book.
Thanks, Miguel. Fixed in r6358.