19 lines
392 B
Bash
Executable File
19 lines
392 B
Bash
Executable File
#!/bin/sh /etc/rc.common
|
|
|
|
device=$(uci get xunlei.config.device)
|
|
file=$(uci get xunlei.config.file)
|
|
mountpoint="`mount | grep "$device" | awk '{print $3;exit}'`"
|
|
|
|
[ -f "$file/xunlei/cfg/thunder_mounts.cfg" ] && cfg="$file/xunlei/cfg/thunder_mounts.cfg"
|
|
[ ! -f "$cfg" ] && {
|
|
cfg="/$file/xunlei/cfg/thunder_mounts.cfg"
|
|
|
|
cat > "$cfg" << EOF
|
|
avaliable_mount_path_pattern
|
|
{
|
|
$mountpoint
|
|
}
|
|
|
|
EOF
|
|
}
|