Date: Mon, 10 May 2010 09:39:34 +0800 From: Fbsd1 <fbsd1@a1poweruser.com> To: Yuri Pankov <yuri.pankov@gmail.com> Cc: "questions@freebsd.org" <questions@freebsd.org> Subject: Re: port pkg-plist Message-ID: <4BE763D6.3000601@a1poweruser.com> In-Reply-To: <20100510011214.GC1747@darklight.org.ru> References: <4BE74941.4040705@a1poweruser.com> <20100509235448.GA1747@darklight.org.ru> <4BE75117.2000308@a1poweruser.com> <20100510002418.GB1747@darklight.org.ru> <4BE7541A.4010804@a1poweruser.com> <20100510011214.GC1747@darklight.org.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Yuri Pankov wrote: > On Mon, May 10, 2010 at 08:32:26AM +0800, Fbsd1 wrote: >> Yuri Pankov wrote: >>> On Mon, May 10, 2010 at 08:19:35AM +0800, Fbsd1 wrote: >>>> Yuri Pankov wrote: >>>>> On Mon, May 10, 2010 at 07:46:09AM +0800, Fbsd1 wrote: >>>>>> In a port I am creating I have some files that are not in the >>>>>> /usr/local directory tree. There in /var/log & /var/db. What is the >>>>>> correct format of the statement in ports pkg-plist file to have >>>>>> these files deleted when the port is deleted with pkg_delete >>>>>> command. >>>>> .... >>>>> @cwd /var >>>>> db/dbfile >>>>> log/logfile >>>>> >>>>> HTH, >>>>> Yuri >>>>> >>>>> >>>> Thanks that worked. Have another question. >>>> During the install of the port it adds a enable="YES" statement to >>>> /etc/rc.conf. It there some pre-canned way to auto remove that >>>> statement when the port is deleted with pkg_delete command? >>> You shouldn't directly modify rc.conf to enable some service, put >>> instructions on how to enable it in pkg-message instead. >>> >>> Having said that, check @unexec command, which is run on package >>> deinstallation. >>> >>> Yuri >>> >> Where do I find doc on this @unexec command? > > All these commands are documented in pkg_create(1). > > Thanks I read that. It will launch what I want to do at deinstall time. But I still need code to parse through a config file looking for a match to the desired literal and then delete that line from the config file and save it. I dont know how to do that in a .sh script. I need a sample doing that using the @unexec command and then I will be able to tweak it to my needs. Can you help me out?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4BE763D6.3000601>