Re: How to Pre-Invoke {"mount -o remount,rw /usr";}; with /etc/apt/apt.conf?
> On 30/11/99 Shaul Karl wrote:
>
> >I tried to change the Pre-Invoke and Post-Invoke lines of /etc/apt/apt.conf so
> >that it would pre mount and post mount my /usr which is normally mounted ro,
> >but failed.
> >How should I do it correctly?
>
> it looks like you copied the example conf from /usr/share/doc you
> should not use that as it is an example and not really suited for
> real use.
>
> i have:
>
> DPkg
> {
> // Auto re-mounting of readonly /usr
> Pre-Invoke {"mount -o remount,rw /usr";};
> Post-Invoke {"mount -o remount,ro /usr";};
> }
>
> which always works for mounting rw but does not always work for
> remounting ro because after install/upgrades for some reason mount
> thinks /usr is busy and refuses to remount it read only. very
> irritating especially since i have not found any files opened with
> write permission with fuser...
>
> dropping down to single user mode and coming back lets it remount
> though, but this is less then convenient... at least it does not ruin
> uptimes :-)
>
Your lines are exactly as mine, aren't they? However I do not think that I have a problem similar to yours because remounting manually before and after apt-get runs is working.
Maybe some other setting in /etc/apt/apt.conf changes the behavior of these lines. Can you email me your /etc/apt/apt.conf?
Reply to: