sorry again, the previous email subject is wrong I don't know why my attachment is detected as binary, i reposted it here as plain text
Index: trunk/package/base-files/files/etc/init.d/boot =================================================================== --- trunk/package/base-files/files/etc/init.d/boot (revision 31391) +++ trunk/package/base-files/files/etc/init.d/boot (working copy) @@ -7,7 +7,11 @@ system_config() { local cfg="$1" - local hostname conloglevel timezone + local hostname conloglevel timezone root_readonly + + #remount root as readonly + config_get root_readonly "$cfg" root_readonly '0' + [ "$root_readonly" -eq 1 ]&& mount -o remount,ro / config_get hostname "$cfg" hostname 'OpenWrt' echo "$hostname"> /proc/sys/kernel/hostname On Sunday, April 22, 2012 01:44 AM, openwrt-devel-requ...@lists.openwrt.org wrote:
------------------------------ Date: Sat, 21 Apr 2012 20:54:44 +0800 From: ching<lschin...@gmail.com> To: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] base-files: implement new config "root_readonly" (RESENT) Message-ID:<4f92ae14....@gmail.com> Content-Type: text/plain; charset="utf-8"; Format="flowed" In the view of user, we always hard power-off router, and do not expect any unexpected background flashing which can lead to fs corruption. As the number of package of OpenWRT increases, the probability of unexpected background flashing will increase. Although OpenWRT developers are brilliant and hard-working, it is impossible to guarantee all packages are bug-free. This change try to implement a new config "root_readonly" in /etc/config/system, which will remount root to read only when reading system config during boot process. This should prevent background flashing. root_readonly=0 #0 - root will be read-write, 1 - root will be read-only Assumption 1. Early boot process do not trigger unnecessary flashing 2. default setting=0 (read-write) to preserve backward compatibility 3. user know how to remount root rw manually if he/she set this option Signed-off-by: ching<lschin...@gmail.com> 1 files changed -------------- next part -------------- A non-text attachment was scrubbed... Name: root_readonly.patch Type: text/x-patch Size: 635 bytes Desc: not available URL:<http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20120421/fa11c850/attachment-0001.bin> ------------------------------
_______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel