Modify

Opened 12 years ago

Closed 12 years ago

Last modified 8 years ago

#449 closed enhancement (wontfix)

/etc/init.d/S40network (edit)

Reported by: Adze Owned by: developers
Priority: low Milestone: 0.9/rc6
Component: base system Version:
Keywords: Cc:

Description

Little change request for /etc/init.d/S40network file for a more modular approuch:

[/code]

#!/bin/sh
case "$1" in

start|restart)

for int in $(nvram show | grep _proto | cut -d _ -f 1); do

ifup $int

done

wifi up

for route in $(nvram get static_route); do {

eval "set $(echo $route | sed 's/:/ /g')"
$DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5

} done
;;

esac

[/code]

Greetings Adze

Attachments (0)

Change History (3)

comment:1 Changed 12 years ago by Adze

Above code was a bit garbled due to wiki formatting. Sorry...

#!/bin/sh
case "$1" in
  start|restart)
    for int in $(nvram show | grep _proto | cut -d _ -f 1); do
      ifup $int
    done

    wifi up

    for route in $(nvram get static_route); do {
      eval "set $(echo $route | sed 's/:/ /g')"
      $DEBUG route add -net $1 netmask $2 gw $3 metric $4 dev $5
    } done
    ;;
esac


comment:2 Changed 12 years ago by anonymous

Strange things will happen if any nvram variable happens to contain "_proto". How about:

... | grep '^[a-zA-Z0-9]*_proto=' | ...

comment:3 Changed 12 years ago by mbm

  • Resolution set to wontfix
  • Status changed from new to closed

See #309

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.