[PATCH] configurenetwork: Tidy-up auto configuration functions
mail at adrianschmutzler.de
mail at adrianschmutzler.de
So Feb 10 22:49:43 CET 2019
Applied.
> -----Original Message-----
> From: Christian Dresel [mailto:fff at chrisi01.de]
> Sent: Sonntag, 10. Februar 2019 17:15
> To: Adrian Schmutzler <freifunk at adrianschmutzler.de>; franken-
> dev at freifunk.net
> Subject: Re: [PATCH] configurenetwork: Tidy-up auto configuration functions
>
> hi
>
> Reviewed-by: Christian Dresel <fff at chrisi01.de>
>
> Gruß
>
> Christian
>
> On 04.02.19 14:05, Adrian Schmutzler wrote:
> > This fixes a typo in description and introduces a single variable for
> > the sysctlfile.
> >
> > Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
> > ---
> > .../fff/fff-network/files/usr/sbin/configurenetwork | 19 ++++++++++-----
> ----
> > 1 file changed, 10 insertions(+), 9 deletions(-)
> >
> > diff --git
> > a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
> > b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
> > index 0e038a49..448bd04b 100755
> > --- a/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
> > +++ b/src/packages/fff/fff-network/files/usr/sbin/configurenetwork
> > @@ -30,19 +30,20 @@ setupPorts() {
> >
> > setAutoConf() {
> > # Sets ipv6 auto configuration on an interface to on/off
> > - # Usage: enableAutoConf <interface> <[0|1]>
> > + # Usage: setAutoConf <interface> <[0|1]>
> > local iface=$1
> > local on=$2
> >
> > - echo "# Generated from configurenetwork" > "/etc/sysctl.d/51-fff-
> network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.accept_ra = $on" >> "/etc/sysctl.d/51-fff-
> network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.accept_ra_defrtr = $on" >> "/etc/sysctl.d/51-
> fff-network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.accept_ra_pinfo = $on" >> "/etc/sysctl.d/51-
> fff-network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.autoconf = $on" >> "/etc/sysctl.d/51-fff-
> network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.accept_ra_rtr_pref = $on" >>
> "/etc/sysctl.d/51-fff-network-$iface.conf"
> > - echo "net.ipv6.conf.$iface.forwarding = 0" >> "/etc/sysctl.d/51-fff-
> network-$iface.conf"
> > + sysctlfile="/etc/sysctl.d/51-fff-network-$iface.conf"
> > + echo "# Generated from configurenetwork" > "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.accept_ra = $on" >> "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.accept_ra_defrtr = $on" >> "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.accept_ra_pinfo = $on" >> "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.autoconf = $on" >> "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.accept_ra_rtr_pref = $on" >> "$sysctlfile"
> > + echo "net.ipv6.conf.$iface.forwarding = 0" >> "$sysctlfile"
> >
> > - /sbin/sysctl -p "/etc/sysctl.d/51-fff-network-$iface.conf"
> > + /sbin/sysctl -p "$sysctlfile"
> > }
> >
> > enableAutoConf() {
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname : nicht verfügbar
Dateityp : application/pgp-signature
Dateigröße : 834 bytes
Beschreibung: nicht verfügbar
URL : <http://lists.freifunk.net/pipermail/franken-dev-freifunk.net/attachments/20190210/a285eb22/attachment.sig>
Mehr Informationen über die Mailingliste franken-dev