8400 questions

9885 answers


14155 members

0 votes
1,255 views 3 comments


I need clarification because I am not a Linux expert.

According to the wifi, the user scripts are stored in /etc/rc.common file:

In most cases people upload config files, custom scripts or software packages. It useful to know where certain files should be uploaded. For example, all config files are stored in /etc/config/; the User Scripts file is called rc.common and stored in /etc/.

According to another part of the wiki, it's written:

The Script Management window shows the content of the /etc/rc.local file. This file is executed at the end of the startup process, executing the line:

sh /etc/rc.local

Shall we store our scripts in /etc/rc.common or in /etc/rc.local ?

If I want to store files (e.g data recorded ) in the RUT955, where is the best place ?

In case of new firmware installation may I sure to retrieve my files and my scripts ?

Thank you by advance

2 Answers

0 votes

Hello, in the RUT955 you should save the scripts in the file /etc/rc.local.

In case to retrieve your files and scripts, i think you should download a backup file before the upgrade and upload it after that.

OK and what about the /etc/rc.common file ?
0 votes
That means folders AND files shall be addressed in the /etc/sysupgrade.conf document.

Good news !

But rc.local or rc.common ? what is the difference ?

The openwrt website said "This init script is just a shell script. The first line is a shebang line that uses /etc/rc.common as a wrapper to provide its main and default functionality and to check the script prior to execution."

- rc.common is used to check the start scripts of (/etc/init.d/*). Looking for mistakes.

- rc.local have the customized scripts, and the system excecutes these scripts after all the "init.d" scripts are up.