[Fedora-packaging] Draft: Init Scripts
notting at redhat.com
Tue Feb 27 17:00:06 UTC 2007
Matthias Saou (thias at spam.spam.spam.spam.spam.spam.spam.egg.and.spam.freshrpms.net) said:
> Argh! I could have sworn I had read the opposite somewhere, and have
> been changing my spec files ever since. Here too, we need to document
> clearly which one we should use, even though the symlink won't be
> removed anytime soon...
Not won't, *can't*.
If you want to remove the symlink, you need a compatibility symlink
in the other way.
At that point, you have 1) a package that moves its script from
/etc/rc.d/init.d -> /etc/init.d 2) a package that removes the
/etc/init.d symlink and replaces it with the directory. Watch
the RPM state machine....
1) Processing upgrade of package foo..
/etc/init.d/foo <- new file in new path, will write
/etc/rc.d/init.d/foo <- old file in old directory, will remove
2) Pre transaction:
/etc/init.d symlink removed, /etc/rc.d/init.d directory moved to
/etc/init.d. /etc/rc.d/init.d symlink created
3) Transaction is run
/etc/init.d/foo is written
/etc/rc.d/init.d/foo is removed
- Oops, that follows the symlink and we remove the file we just wrote.
More information about the Fedora-packaging