Re: Draft: Init Scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Matthias Saou (thias@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) 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.
    
Bill

--
Fedora-packaging mailing list
Fedora-packaging@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-packaging

[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux