Take the 2-minute tour ×
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.

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

1 Answer 1

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.*
/var/lib/dpkg/info/hdparm.conffiles
/var/lib/dpkg/info/hdparm.list
/var/lib/dpkg/info/hdparm.md5sums
/var/lib/dpkg/info/hdparm.postinst
/var/lib/dpkg/info/hdparm.postrm
/var/lib/dpkg/info/hdparm.preinst

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

share|improve this answer

Your Answer

 
discard

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.