[Extracted, edited down, and expanded from a mailing list post.]


p@satan$ dpkg -S hostname.sh
sysvinit: /etc/init.d/hostname.sh

RM notes: Works only if the package is installed.


p@satan$ auto-apt search hostname.sh
etc/init.d/hostname.sh base/sysvinit

Even better: When building software in the environment entered by typing "auto-apt run", auto-apt will detect your need for a file not yet installed, and initiate an apt-get fetch of the package on your behalf.


satan# apt-file search hostname.sh
sysvinit: etc/init.d/hostname.sh

Local package listing for sysvinit:

p@satan$ dpkg -L sysvinit | grep hostname

In fact, there's no package on my system named initscripts:

satan# dpkg -l "initscr*"
No packages found matching initscr*.

The package listing on the Debian website shows hostname.sh to be in sysvinit: