Modify

Opened 8 years ago

Closed 8 years ago

#7270 closed defect (worksforme)

rc.common enable does not work with squashfs

Reported by: w.deborger@… Owned by: developers
Priority: high Milestone: Backfire 10.03.1
Component: base system Version: Backfire 10.03
Keywords: Cc:

Description

I have a routerstation pro and found out that I can't enable init scripts

I also found out that is due to the fact that rc.s builds a list of all init-scripts before the root file system is pivoted

the code responsible in rc.s

run_scripts() {

for i in /etc/rc.d/$1*; do

[ -x $i ] && $i $2 2>&1

done | $LOGGER

}

the first script performs the pivot, but by then, the list '/etc/rc.d/$1*' was already built

I would propose pulling out the S10Boot from init and calling is directly from rc.s, before starting the for loop

What surprises me is that there are not too many people complaining about this? (only found one reference on the ubiquity form)

Wouter

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by anonymous

init scripts are enabled via

/etc/init.d/script enable

comment:2 in reply to: ↑ description Changed 8 years ago by Niels Böhm <bitbucket@…>

For me (I'm using the current trunk), the root file system gets pivoted during /etc/preinit (calling the scripts in /lib/preinit/*) and thus before the rc scripts get executed. Therefore manually enabled init scripts also work at the next reboot.

comment:3 follow-up: Changed 8 years ago by w.deborger@…

thanks for the hint, closer examination shows that the bootloader doesn't pass the init=/etc/preinit argument, is there a known workaround for this?

(I'm not too keen on tampering with the bootloader)

comment:4 Changed 8 years ago by w.deborger@…

on closer examination

the argument init=/etc/preinit is missing from any non brcm-2.4 kernel, which explains ;-)

comment:5 in reply to: ↑ 3 Changed 8 years ago by Niels Böhm <bitbucket@…>

Replying to w.deborger@…:

thanks for the hint, closer examination shows that the bootloader doesn't pass the init=/etc/preinit argument, is there a known workaround for this?

There is no such boot parameter for me either. The kernel gets patched directly to execute /etc/preinit instead of the usual default inits in (for instance) target/linux/generic-2.6/patches-2.6.32/999-use_preinit_as_init.patch. But maybe this gets overridden if you indeed set that boot parameter (for example by configuring CONFIG_TARGET_INIT_CMD). Maybe this happens just by enabling the corresponding config section? If so, you might try setting that parameter to /etc/preinit directly.

comment:6 Changed 8 years ago by w.deborger@…

It seems to work now,
I think it stopped working because I removed luci,

the symlinks still existed, but their targets didn't and this must have killed rc.s

comment:7 Changed 8 years ago by florian

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

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.