mirror of
https://github.com/srlabs/blue-merle.git
synced 2025-01-03 11:30:56 -05:00
web: offer to shutdown on SIM swap
It currently times out when generating an IMEI. I wonder what the timeouts are.
This commit is contained in:
parent
b02faa7adb
commit
3b87b1b8f4
@ -30,6 +30,11 @@ elif [ "$1" == "random-imei" ]; then
|
|||||||
elif [ "$1" == "shutdown-modem" ]; then
|
elif [ "$1" == "shutdown-modem" ]; then
|
||||||
exec gl_modem AT AT+CFUN=4
|
exec gl_modem AT AT+CFUN=4
|
||||||
|
|
||||||
|
elif [ "$1" == "shutdown" ]; then
|
||||||
|
echo '{ "msg": "Shutdowing down..." }' > /dev/ttyS0
|
||||||
|
halt -d 5
|
||||||
|
echo -n "Shutting down"
|
||||||
|
|
||||||
elif [ "$1" == "write-imei" ]; then
|
elif [ "$1" == "write-imei" ]; then
|
||||||
new_imei=$2
|
new_imei=$2
|
||||||
echo -n { "action": "write" }
|
echo -n { "action": "write" }
|
||||||
|
@ -771,6 +771,11 @@ function handleConfig(ev)
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handleShutdown(ev)
|
||||||
|
{
|
||||||
|
return callBlueMerle("shutdown")
|
||||||
|
}
|
||||||
|
|
||||||
function handleRemove(ev)
|
function handleRemove(ev)
|
||||||
{
|
{
|
||||||
var name = ev.target.getAttribute('data-package'),
|
var name = ev.target.getAttribute('data-package'),
|
||||||
@ -849,10 +854,16 @@ function handleSimSwap(ev) {
|
|||||||
),
|
),
|
||||||
E('p', { 'class': 'text'},
|
E('p', { 'class': 'text'},
|
||||||
_("Please shutdown the device and go to another place before booting")
|
_("Please shutdown the device and go to another place before booting")
|
||||||
)
|
),
|
||||||
|
E('button', { 'class': 'btn cbi-button-positive', 'click': handleShutdown, 'disabled': isReadonlyView }, [ _('Shutdown…') ]), ' ',
|
||||||
}
|
}
|
||||||
).catch(
|
).catch(
|
||||||
function(err) {
|
function(err) {
|
||||||
|
dlg.appendChild(
|
||||||
|
E('p',{'class': 'error'},
|
||||||
|
_('Error setting IMEI! ') + err
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user