-
Notifications
You must be signed in to change notification settings - Fork 238
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,466 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.9.1.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1.2.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/bin/sh | ||
|
||
export KSROOT=/koolshare | ||
source $KSROOT/scripts/base.sh | ||
|
||
_get_model(){ | ||
local odmpid=$(nvram get odmpid) | ||
local MODEL=$(nvram get productid) | ||
local _tmp="unknow" | ||
if [ -n "${odmpid}" ];then | ||
_tmp=$(echo "${odmpid}"|tr '[A-Z]-' '[a-z]_') | ||
else | ||
_tmp=$(echo "${MODEL}"|tr '[A-Z]-' '[a-z]_') | ||
fi | ||
echo ${_tmp} | ||
} | ||
|
||
_get_mac(){ | ||
local MACADDR=$(nvram get et0macaddr)||"FF:FF:FF:FF:FF:FF" | ||
local _MACMD5=$(echo $MACADDR|md5sum) | ||
local _MACMD5=${_MACMD5% -} | ||
echo $_MACMD5 | ||
} | ||
|
||
get_current_jffs_status(){ | ||
local cur_patition=$(df | /bin/grep /jffs) | ||
if [ -n "${cur_patition}" ];then | ||
JFFS_USED=$(echo ${cur_patition} | awk '{print $3}') | ||
JFFS_TOTAL=$(echo ${cur_patition} | awk '{print $2}') | ||
else | ||
JFFS_USED=0 | ||
JFFS_TOTAL=0 | ||
fi | ||
} | ||
|
||
eval $(dbus export ddnsto_) | ||
DDNSTO_URL=${ddnsto_url} | ||
if [ -z "${DDNSTO_URL}" ]; then | ||
UQ_ID=$(_get_mac) | ||
DDNSTO_URL=$(echo "https://asus-${UQ_ID:0:8}.kooldns.cn") | ||
fi | ||
|
||
DDNSTO_INSTALL=$(dbus get softcenter_module_ddnsto_install) | ||
if [ -n "${DDNSTO_INSTALL}" ]; then | ||
if [ ! -f "/koolshare/bin/ddnsto" ]; then | ||
DDNSTO_INSTALL=0 | ||
fi | ||
else | ||
DDNSTO_INSTALL=0 | ||
fi | ||
|
||
DDNSTO_STATUS=$(ps | grep -w ddnsto | grep -cv grep) | ||
DDNSTO_PID=$(pidof ddnsto) | ||
|
||
DDNSTO_DEVICE_ID=$(/koolshare/bin/ddnsto -w|cut -d ' ' -f2) | ||
|
||
get_current_jffs_status | ||
|
||
RESP=$(echo '{\"ddnsto_url\":\"'${DDNSTO_URL}'\",\"ddnsto_token\":\"'${ddnsto_token}'\",\"ddnsto_install\":'${DDNSTO_INSTALL}',\"ddnsto_status\":'${DDNSTO_STATUS}',\"ddnsto_device_id\":\"'${DDNSTO_DEVICE_ID}'\",\"ddnsto_pid\":\"'${DDNSTO_PID}'\",\"jffs_used\":\"'${JFFS_USED}'\",\"jffs_total\":\"'${JFFS_TOTAL}'\"}') | ||
http_response "${RESP}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
1.4 | ||
1.5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<!DOCTYPE html | ||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
|
||
<head> | ||
<meta http-equiv="X-UA-Compatible" content="IE=Edge" /> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache" /> | ||
<meta HTTP-EQUIV="Expires" CONTENT="-1" /> | ||
<link rel="shortcut icon" href="images/favicon.png" /> | ||
<link rel="icon" href="images/favicon.png" /> | ||
<title>KoolShare - 软件中心</title> | ||
<link rel="stylesheet" type="text/css" href="index_style.css" /> | ||
<link rel="stylesheet" type="text/css" href="form_style.css" /> | ||
<link rel="stylesheet" type="text/css" href="css/element.css"> | ||
<link rel="stylesheet" type="text/css" href="/res/softcenter.css"> | ||
<link rel="stylesheet" type="text/css" href="/res/layer/theme/default/layer.css"> | ||
<script type="text/javascript" src="/res/Browser.js"></script> | ||
<script type="text/javascript" src="/res/softcenter.js"></script> | ||
<script type="text/javascript" src="/state.js"></script> | ||
<script type="text/javascript" src="/js/jquery.js"></script> | ||
<script type="text/javascript" src="/general.js"></script> | ||
<script type="text/javascript" src="/popup.js"></script> | ||
<script> | ||
var noChange_status = 0; | ||
var _responseLen; | ||
window.Koolshare_Software = { | ||
EXT: '<% nvram_get("extendno"); %>', | ||
jffs2_scripts: '<% nvram_get("jffs2_scripts"); %>', | ||
ro_model: '<% nvram_get("odmpid"); %>' || '<% nvram_get("productid"); %>', | ||
ro_mac_addr: '<% nvram_get("et0macaddr"); %>', | ||
net_addr: '<% nvram_get("lan_ipaddr"); %>', | ||
home_url: '<% nvram_get("sc_url"); %>', | ||
skin: ('<% nvram_get("sc_skin"); %>').toUpperCase(), | ||
} | ||
function init() { | ||
show_menu(menu_hook); | ||
} | ||
function menu_hook(title, tab) { | ||
tabtitle[tabtitle.length - 1] = new Array("", "软件中心",); | ||
var fileName = window.location.pathname | ||
if (fileName[0] == "/") { | ||
fileName = fileName.slice(1) | ||
} | ||
tablink[tablink.length - 1] = new Array("", fileName); | ||
} | ||
</script> | ||
<!-- --> | ||
<script type="module" crossorigin src="/res/soft-v19/assets/index.b2655c80.js"></script> | ||
<link rel="modulepreload" href="/res/soft-v19/assets/vendor.cad358c0.js"> | ||
<link rel="stylesheet" href="/res/soft-v19/assets/style.6e05d620.css"> | ||
<!-- --> | ||
</head> | ||
|
||
<body onload="init();"> | ||
<div id="TopBanner"></div> | ||
<div id="Loading" class="popup_bg"></div> | ||
<table class="content" align="center" cellpadding="0" cellspacing="0"> | ||
<tr> | ||
<td width="17"> </td> | ||
<td valign="top" width="202"> | ||
<div id="mainMenu"></div> | ||
<div id="subMenu"></div> | ||
</td> | ||
<td valign="top"> | ||
<div id="tabMenu" class="submenuBlock"></div> | ||
<table width="100%" style="width: calc( 100% - 6px);" border="0" align="left" cellpadding="0" | ||
cellspacing="0"> | ||
<tr> | ||
<td align="left" valign="top"> | ||
<div id="app" skin='<%nvram_get("sc_skin");%>'></div> | ||
</td> | ||
</tr> | ||
</table> | ||
</td> | ||
<td width="10" align="center" valign="top"></td> | ||
</tr> | ||
</table> | ||
<div id="footer"></div> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.