#1 2010-04-08 13:54:08
[Tomato USB] 系統啟動檔與profile
機型: 華碩 WL-500gP
韌體: Tomato Firmware v1.27.8745 ND USB vpn3.6
系統啟動檔, 對應WebUI:
# nvram show | grep script
script_brau= 巴比祿專用切換開關
script_fire= Administration--> Scripts--> Firewall
script_init= Administration--> Scripts--> Init
script_shut= Administration--> Scripts--> Shutdown
script_usbhotplug= USB and NAS--> USB Support--> Hotplug script
script_usbmount= USB and NAS--> USB Support--> Run after mounting
script_usbumount= USB and NAS--> USB Support--> Run before unmounting
script_wanup= Administration--> Scripts--> WAN Up
sesx_script= Administration--> Buttons / LED--> Custom Script
個人做法:
script_init=/jffs/usr/bin/init.sh
# cat /jffs/usr/bin/init.sh
#!/bin/sh
ln -s /jffs/usr/codepages/cp950/codepage.950 /usr/share/codepage.950
ln -s /jffs/usr/codepages/cp950/unicode_map.950 /usr/share/unicode_map.950
insmod /jffs/usr/codepages/cp950/nls_cp950.o
insmod /jffs/usr/codepages/cp950/nls_big5.o
script_usbhotplug=/jffs/usr/bin/usbhotplug.sh
# cat /jffs/usr/bin/usbhotplug.sh
#!/bin/sh
swapon /dev/discs/disc0/part6
fsck.ext3 -pv /dev/discs/disc0/part5 | logger -s
fsck.ext3 -pv /dev/discs/disc1/part5 | logger -s
mount /dev/discs/disc0/part5 /opt
mkdir /mnt/hd
mount /dev/discs/disc1/part5 /mnt/hd
script_shut=/jffs/usr/bin/shutdown.sh
# cat /jffs/usr/bin/shutdown.sh
#!/bin/sh
sync
umount /tmp/mnt/disc1_5
umount /tmp/mnt/disc0_5
umount /mnt/hd
umount /opt
swapoff /dev/discs/disc0/part6
profile:
# cat /jffs/etc/profile
export PS1='[\u@\h \W]\$ '
最後修改: hippo (2010-12-07 21:36:54)
離線
相關討論主題
主題 | 回覆 | 點閱 | 最後發表 |
---|---|---|---|
置頂 |
33 | 85504 | 2024-10-23 08:28:27 作者 huiduo |
置頂 |
1625 | 3045379 | 2024-04-28 12:35:05 作者 s87311 |
|
155 | 349243 | 2022-12-08 17:08:17 作者 dir868l |
置頂 |
54 | 207908 | 2022-09-15 12:25:01 作者 chiachu |
|
222 | 504675 | 2022-09-14 14:54:52 作者 chiachu |