#33 2010-05-18 22:45:52
Re: [Lly] ASUS RT-N16 alpha?
ntfs-3g_rtn_www_control.patch 內容..
diff -urBp a/httpd/variables.c b/httpd/variables.c
--- a/httpd/variables.c 2010-05-06 04:57:22.000000000 +0400
+++ b/httpd/variables.c 2010-05-18 10:31:51.000000000 +0400
@@ -2378,6 +2378,7 @@
{"raw_enable", "", validate_range, ARGV("0","1"), FALSE, FALSE},
{"audio_enable", "", validate_range, ARGV("0","1"), FALSE, FALSE},
{"usb20_disable_x", "", validate_range, ARGV("0","1"), FALSE, FALSE},
+ {"ntfs3g_enable", "", validate_range, ARGV("0","1"), FALSE, FALSE},
{ 0, 0, 0, 0, 0, 0}
};
diff -urBp a/rc/services_ex.c b/rc/services_ex.c
--- a/rc/services_ex.c 2010-05-06 04:57:22.000000000 +0400
+++ b/rc/services_ex.c 2010-05-18 10:52:25.258637224 +0400
@@ -673,6 +673,12 @@ start_usb(void)
eval("insmod", "scsi_mod");
eval("insmod", "sd_mod");
eval("insmod", "usb-storage");
+#ifdef __CONFIG_NTFS3G__
+ if (nvram_match("ntfs3g_enable", "1"))
+ {
+ eval("insmod", "fuse");
+ }
+#endif
}
#endif
if (nvram_match("usb_nfsenable_x", "1"))
@@ -713,10 +719,17 @@ stop_usb(void)
eval("killall", "stupid-fptd");
eval("killall", "smbd");
eval("killall", "nmbd");
+ eval("killall", "ntfs-3g");
umount_all_part(NULL, -1);
eval("rmmod", "usb-storage");
eval("rmmod", "sd_mod");
eval("rmmod", "scsi_mod");
+#ifdef __CONFIG_NTFS3G__
+ if (nvram_match("ntfs3g_enable", "1"))
+ {
+ eval("rmmod", "fuse");
+ }
+#endif
}
#endif
#ifdef WEBCAM_SUPPORT
@@ -1529,6 +1542,16 @@ mount_r(char *mnt_dev, char *mnt_dir)
sprintf(options, "iocharset=%s%s",
isdigit(nvram_get("usb_smbcset_x")[0]) ? "cp" : "",
nvram_get("usb_smbcset_x"));
+#ifdef __CONFIG_NTFS3G__
+ if (nvram_match("ntfs3g_enable", "1")) {
+ flags = MS_NOATIME;
+ mkdir_if_none(mnt_dir);
+ eval("ntfs-3g", mnt_dev, mnt_dir);
+ logmessage("USB storage", "%s%s fs at %s mounted to %s",
+ type, (flags & MS_RDONLY) ? "(ro)" : "", mnt_dev, mnt_dir);
+ return (flags & MS_RDONLY) ? MOUNT_VAL_RONLY : MOUNT_VAL_RW;
+ }
+#endif
}
if (flags && !mkdir_if_none(mnt_dir) &&
diff -urBp a/shared/flash.default b/shared/flash.default
--- a/shared/flash.default 2010-05-06 04:57:22.000000000 +0400
+++ b/shared/flash.default 2010-05-18 10:34:45.000000000 +0400
@@ -430,6 +430,9 @@
{"raw_enable", "1", 0},
{"audio_enable", "0", 0},
{"usb20_disable_x", "0", 0},
+#ifdef __CONFIG_NTFS3G__
+{"ntfs3g_enable", "0", 0},
+#endif
{"wl_nbw","40",0},
{"wl_mimo_preamble", "mm", 0},
diff -urBp a/www/mkweb b/www/mkweb
--- a/www/mkweb 2010-05-04 04:43:56.000000000 +0400
+++ b/www/mkweb 2010-05-18 10:53:41.353908117 +0400
@@ -111,6 +111,11 @@ if [ -n "$1" ]; then
sed -ri '/WaveServer daemon/d' ../web_$MODEL/Advanced_Services_Content.asp
fi
+ if [ "$CONFIG_NTFS3G" != "y" ]; then
+ echo "Removing NTFS-3G elements..."
+ sed -ri '/ntfs/d' ../web_$MODEL/Advanced_Services_Content.asp
+ fi
+
### 4. Strip *.asp, *.css and *.js ###
echo "Stripping web interface..."
diff -urBp a/www/web_asus_en/Advanced_Services_Content.asp b/www/web_asus_en/Advanced_Services_Content.asp
--- a/www/web_asus_en/Advanced_Services_Content.asp 2010-05-04 04:43:56.000000000 +0400
+++ b/www/web_asus_en/Advanced_Services_Content.asp 2010-05-18 10:55:26.143302279 +0400
@@ -95,6 +95,20 @@ you to perform advanced configuration.
+
+
+
+Mount options
+
+
+Read-Write NTFS Support:
+>Yes>No
+
+
+
+
+
+
 
看其內容應該是下載後,在命令列下執行此一patch吧。
技術問題請於論壇上集眾人之力公開討論,感恩
離線
相關討論主題
主題
回覆
點閱
最後發表
ASUS RT-N66U刷Shibby 140 MultiWAN後設定為無線AP 作者 lcjh20516
0
2354
2022-08-26 12:56:28 作者 lcjh20516
159
383157
2022-08-14 06:06:27 作者 lcjh20516
21
83348
2022-08-14 05:54:54 作者 lcjh20516
置頂
132
372845
2022-06-07 10:13:50 作者 dennys
45
139703
2022-05-06 14:32:17 作者 max7441