IMSI=
HOOK_SETTINGS="${HOOK_SETTINGS} IMSI"
-function hook_check() {
+function hook_check_settings() {
assert isset DEVICE
assert isset PHONE_NUMBER
assert isset zone
# Load configuration file.
- zone_settings_read "${zone}" ${HOOK_SETTINGS}
+ zone_settings_read "${zone}"
# If we have got a PIN, we try to unlock the device first.
if isset PIN; then
if ! modem_sim_auto_unlock "${DEVICE}" "${PIN}"; then
# Reset the PIN setting.
PIN=""
- zone_settings_write "${zone}" ${HOOK_SETTINGS}
+ zone_settings_write "${zone}"
error "Could not unlock the SIM card. Removing PIN from settings."
fi
cli_device_headline ${zone}
- zone_settings_read "${zone}" ${HOOK_SETTINGS}
+ zone_settings_read "${zone}"
cli_headline 2 "Configuration"
cli_print_fmt1 2 "Username" "${USERNAME}"
assert isset file
# Read in the configuration files.
- zone_settings_read "${zone}" ${HOOK_SETTINGS}
+ zone_settings_read "${zone}"
pppd_write_config ${file} \
--interface="${zone}" \