Opened 4 years ago

Closed 4 years ago

#15551 closed defect (worksforme)

Some commands get ignored in rc.local

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Trunk
Keywords: Cc:


Since one of the last builds (from over the last two weeks), some commands on rc.local are somehow ignored:

ip rule add fwmark 1 table main
ip rule add fwmark 2 table vpn1
ip rule add fwmark 3 table vpn2

after boot ip rule doesnt show them. it's a weird problem, I have three routers and it's working on two of them, but not on the third, and I dont know how/why. it worked perfectly until one of the last trunk updates, mostly since you totally messed everything up with that netifd change/implementation.

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by anonymous

I have "solved" it with a workaround of putting these commands into another sh script with a "sleep 15" and then it's working. It seems the done script which runs rc.local somehow isnt running at the correct "boot time", but it's still set to 95 and nothing what matters is executed after it. Something was changed I guess in one of the last trunk builds causing something not being up correctly before the done script, but I dont know what. No one has an idea?

comment:2 Changed 4 years ago by anonymous

i also have this bug,i use mw4530r+r40694,in rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

ip link add link eth0.2 vth2 type macvlan
ifconfig vth2 hw ether BC:D1:77:FF:76:24
ifconfig vth2 up

exit 0
after boot vth2 does not show in ifconfig

comment:3 Changed 4 years ago by jow

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

The rc.local file gives no guarantees regarding the availability of network interfaces. Use hotplug for that.

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.