Re: Restoring /etc/inittab
--- Shaun Jackman <sdj@sfu.ca> wrote:
> I tried apt-file, but inittab is not in *any* package as far as I can
> tell. It's not in sysvinit.
>
> # dpkg -L sysvinit | grep inittab
> /usr/share/doc/sysvinit/examples/inittab
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
That is the file you can use as a template to cp to /etc !
> To answer your other question, I did something along the lines of...
>
> rm passwd~ *
Well that was stupid!
> uh, d'oh
Quite. :)
> I don't know exactly what happened, or when it happend. I was happily
> editing some config files when I noticed all the config files in /etc
> (but not subdirectories) had ... well ... gone away!
The reason that happend was because you had a space after the 'passwd~',
hence the shell globbed everything in /etc, and replaced it with all the
filenames contained therein.
What you should have done was:
rm *~
> I have -i aliased into cp, mv, and rm, so I don't know how it
> happened! If my system ever boots again, I'll be browsing through the
> .bash_history.
No need, I've just told you why. :) The lesson here is *don't* do anything
as root until you are sure.
-- Thomas Adam
=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor" -- http://linuxgazette.net
"<shrug> We'll just save up your sins, Thomas, and punish
you for all of them at once when you get better. The
experience will probably kill you. :)"
-- Benjamin A. Okopnik (Linux Gazette Technical Editor)
__________________________________
Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover
Reply to: