Backing up old installed files?

Darren Pilgrim freebsd at bitfreak.org
Wed Feb 14 23:57:20 UTC 2007


Alejandro Pulver wrote:
> On Sat, 10 Feb 2007 13:27:42 -0800
> Darren Pilgrim <freebsd at bitfreak.org> wrote:
> 
>> I'm writing a port for a script that stores the configuration data in 
>> the same file as the program code itself.  The long-term solution is to 
>> move the configuration data to another file, of course; however, that's 
>> proving to be a far slower process than originally expected.
>>
>> Other than delaying the submission until the configuration data is split 
>> from the script, what can/should I do?
> 
> Hello.
> 
> You can install the original script in ${PREFIX}/libexec and a wrapper
> script in ${PREFIX}/bin, that would copy it to the user's home
> directory if not exists and run it from there.

That wouldn't work in this case.  The script is a daemon (postfix policy 
service), not a user program.

The best I've come up with so far is to install the script to 
${PREFIX}/share/${PORTNAME}, then add a note to pkg-message to have the 
user copy the script to runnable location (i.e., the postfix config 
directory), edit the internal config and set the path in /etc/rc.conf. 
This means a manual step to install/upgrade and an orphan when the port 
is deinstalled, but it's the least-evil solution I've come up with.


More information about the freebsd-ports mailing list