View previous topic :: View next topic |
Author |
Message |
MacMasta Guru
Joined: 18 Apr 2002 Posts: 545 Location: Anchorage, AK
|
Posted: Thu May 09, 2002 1:13 am Post subject: Clarification on Config-File Protection |
|
|
I've read all the little documents, and I'm not clear on exactly how the config-file protection works.
I emerge a package (samba, for example) and it writes a default config file, which I edit to do what I want. So far, so good. Now, samba gets an update, and I rebuild it. With config protection turned on, emerge renames the file something properly cryptic and spits it out. (with a friendly hint as to how to find it, though)
Without the config-file protection, would it just re-write the default over my handcrafted file?
Or would it do nothing at all?
As a matter of practice, should I just not worry about the new (the ones emerge buillds) config files unless I know there's been a syntax change in the config file?
Thanks!
~Mac~ |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu May 09, 2002 1:18 am Post subject: Re: Clarification on Config-File Protection |
|
|
MacMasta wrote: | Without the config-file protection, would it just re-write the default over my handcrafted file? |
Yes.
MacMasta wrote: | As a matter of practice, should I just not worry about the new (the ones emerge buillds) config files unless I know there's been a syntax change in the config file? |
You should always diff the config files to see what is changed. Often, you can ignore the new version, but it's still worthwhile to at least look. Yyou can also use etc-update in the gentoolkit, but some folks have reported problems with that, so use with caution (and backups)
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
MacMasta Guru
Joined: 18 Apr 2002 Posts: 545 Location: Anchorage, AK
|
Posted: Thu May 09, 2002 1:25 am Post subject: Converter, or config-backup script? |
|
|
Well, two ideas, then:
Can we write file-format converters and include them in the ebuild scripts?
Perhaps something like
Code: | emerge foo --config-autoupdate |
to bring the user's config file up to date with the most recent format?
And/Or
an emerge function that makes a backup of all the config files? It "knows" where they all are via the config-file protection already - perhaps every time it sees a file to not overwrite, it makes the cryptic-named file, and backs up the old one, as well. That way, we could pass it things to do like run the script mentioned above, but we'll have backups of the old setup if we need to downgrade.
(And it would be pretty easy, too - that's the point)
~Mac~ |
|
Back to top |
|
|
klieber Bodhisattva
Joined: 17 Apr 2002 Posts: 3657 Location: San Francisco, CA
|
Posted: Thu May 09, 2002 1:39 am Post subject: Re: Converter, or config-backup script? |
|
|
MacMasta wrote: | Code: | emerge foo --config-autoupdate |
|
Just knowing how varied config scripts across packages, I don't see this being feasible -- certainly not in the near future. How do you possibly account for all the different ways a user could create/modify their config script? (hint: you can't ) Debian does something like this, but even then, they give you a choice -- let Debian manage it entirely or let you manage it entirely. No overlap.
MacMasta wrote: | an emerge function that makes a backup of all the config files? It "knows" where they all are via the config-file protection already |
Well, Gentoo should "know" where all your config files are, because they all should be in /etc. (except user-specific configs). That said, it's fairly easy to write a script that will automatically back up your /etc directory. In fact, someone has already done this (make sure to read the whole thread -- there are some good modifications that are suggested later on.
--kurt _________________ The problem with political jokes is that they get elected |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|