* Re: [PATCH 2/2] update.sh: If 'ExitNode' is in usage, it will be changed to 'ExitNodes'
[not found] <9BF1A504-D869-483A-9DB1-1C56025B3304@ipfire.org>
@ 2023-12-01 3:22 ` ummeegge
0 siblings, 0 replies; only message in thread
From: ummeegge @ 2023-12-01 3:22 UTC (permalink / raw)
To: development
[-- Attachment #1: Type: text/plain, Size: 1822 bytes --]
Good morning Michael,
Am Donnerstag, dem 30.11.2023 um 09:36 +0000 schrieb Michael Tremer:
> Hello Erik,
>
> Thanks for the patch, but doesn’t it look a little bit over-
> engineered?
Probably :-) .
>
> > On 30 Nov 2023, at 07:56, Erik Kapfer <erik.kapfer(a)ipfire.org>
> > wrote:
> >
> > Signed-off-by: Erik Kapfer <erik.kapfer(a)ipfire.org>
> > ---
> > config/rootfiles/core/182/update.sh | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/config/rootfiles/core/182/update.sh
> > b/config/rootfiles/core/182/update.sh
> > index 4416e73f4..cb7d853ec 100644
> > --- a/config/rootfiles/core/182/update.sh
> > +++ b/config/rootfiles/core/182/update.sh
> > @@ -91,6 +91,17 @@ if grep -q "ENABLED=on"
> > /var/ipfire/vpn/settings; then
> > /etc/rc.d/init.d/ipsec start
> > fi
> >
> > +# Change deprecated option in tor configuration file if in usage
> > +if grep -q 'ExitNode ' /var/ipfire/tor/torrc; then
> > + if pgrep tor >/dev/null; then
> > + /usr/local/bin/torctrl stop >/dev/null
> > + sed -i 's/ExitNode /ExitNodes /g' /var/ipfire/tor/torrc
> > + /usr/local/bin/torctrl restart >/dev/null
> > + fi
> > +else
> > + sed -i 's/ExitNode /ExitNodes /g' /var/ipfire/tor/torrc
>
> You can always run this command without checking for “ExitNode “
> because, because it wouldn’t break anything.
Mainly therefor to spare a tor restart if nothing have to be changed
but if this fix goes into the next update, a reboot is needed anyway.
>
> And I think that stopping Tor feels a little bit complicated, or does
> it actually overwrite its own configuration file?
No i don´t think so, mainly business a usual.
Will send a v2.
>
> -Michael
Best,
Erik
>
> > +fi
> > +
> > # Rebuild initial ramdisks
> > dracut --regenerate-all --force
> > KVER="xxxKVERxxx"
> > --
> > 2.42.0
> >
>
^ permalink raw reply [flat|nested] only message in thread