Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After removing the init script for hdparm with # update-rc.d hdparm remove, the wish is to re-install/fix/repair the hdparm init script. In other words to undo the update-rc.d removal.

Calling # update-rc.d hdparm defaults doesn't seem right:

# update-rc.d -n hdparm defaults
update-rc.d: using dependency based boot sequencing
update-rc.d: warning: hdparm start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (S)
update-rc.d: warning: hdparm stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (none)

Another internet resource shows that # update-rc.d hdparm start 07 S . might be the correct re-installation command for hdparm.

But how to find out how the currently installed apt-get install -t unstable hdparm did exactly install its init script(s)?

share|improve this question
up vote 2 down vote accepted

You'll find the pre- and post- installation and removal scripts in /var/lib/dpkg/info.

% ls -1 /var/lib/dpkg/info/hdparm.*

hdparm.postinst (the script that is ran after successful installation) is the one that calls update-rc.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.