OpenWrt Forum Archive

Topic: Init.d

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi I am new to openwrt trying to build images with trunk repository

was playing with rc.d directory

(under /files/etc) trying to change S40fstab to S13fstab

I am trying to mount a usb device as storage for the log files to see if I can understand

what is going on at startup with my router configuration so I would like to have the usb mounted as soon as possible to

start system logging

but when I rebuild the image under etc/rc.d S13fstab get reversad to S40fstab.

I read on the forum that with uci I should try to change prioprity in squashfs-root/etc/uci-defaults ?

My question is why etc/rc.d gets rewritten ?

What UCi means ? Meaning is there a picture/slide/ something that could helpo me to understand what is going on at

router startup (after the boot). I kind of understud that Uci takes control over initial configuration but why having both

uci-defaults and rc.d ??

I know the initial learning curve is steep but I am like missing an overall big picture/flow chart that could help me understand how an embedded router works .

Thank You very much for your patience !!!

Is there any kind of manual (pdf version) that could help me understand openwrt apart from the wiki ?

Should I start with books about linux and routing ?

Bests

P.

(Last edited by Pippo1980 on 22 Dec 2017, 13:51)

Hi trying to figure out UCI configuration:

squashfs-root/etc/uci-defaults/03_network

the scripts starts with:

#!/bin/sh
#
# Copyright (C) 2011 OpenWrt.org
#

[ -e /etc/config/network ] && exit 0

touch /etc/config/network

. /lib/functions/uci-defaults.sh
. /lib/ar71xx.sh

ucidef_set_interface_loopback

board=$(ar71xx_board_name)

case "$board" in
all0315n |\
all0258n |\
ja76pf2|\
ubnt-unifi-outdoor)
    ucidef_set_interface_lan "eth0 eth1"

..........................................................

where does the "$board" in the   'case "$board" in? line

come from ??

I mean if I am trying to replicate a openwrt installation using binaries from router X to a router Y with a compatible motherboard could I just
replace

board=$(ar71xx_board_name) with i.e. board=$wndr3700 or something similar ...

I know this is basic scripting but to me its like hieroglyphic

Thanks

P.

. /lib/ar71xx.sh    <------ from there

thanks I'll see If I can figure it out

Bests

P.

The discussion might have continued from here.