Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 2937  / 2 Years ago, thu, march 3, 2022, 11:54:36

I've mistakenly copied the /etc/rc.local over the /etc/init.d/rc.local and I was wondering how can I retore the init.d/rc.local contents?



Is it possible to generate the original file or copy it from somewhere?



Thanks in advance!


More From » 13.04

 Answers
5

You can use `dpkg' to find out which package is providing a file. In your case you could have used:



sudo dpkg -S /etc/init.d/rc.local


This would have told you that the file is provided by package `initscripts':



$ sudo dpkg -S /etc/init.d/rc.local
initscripts: /etc/init.d/rc.local


Then just reinstall that package:



sudo apt-get install --reinstall initscripts


References:



http://manpages.ubuntu.com/manpages/raring/man1/dpkg.1.html



http://manpages.ubuntu.com/manpages/raring/man8/apt-get.8.html


[#30134] Friday, March 4, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eballxeye

Total Points: 370
Total Questions: 91
Total Answers: 139

Location: Suriname
Member since Sat, Jan 1, 2022
2 Years ago
;