diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-12 14:53:23 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2014-12-12 14:53:23 +0100 |
commit | 42cc96e2c1edb6863909ef460770bd9e0b23ad58 (patch) | |
tree | 5424e99f381ac3dafa5041bd947f985bab27e541 /src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c | |
parent | 8381a6a4835feae6b714fb6fac38c247b69958ee (diff) |
sysmobts: Add an option to stop the systemd sysmobts.service
For systems without direct access to the PA the best option
is to simply switch off the bts service. This will stop the
transmission which will take load from the DSP/FPGA/RF circuit
and indirectly from the PA as well.
We should introduce "pa-on and bts-on" that can be executed
as "normal" action.
Diffstat (limited to 'src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c')
-rw-r--r-- | src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c index 9c8b15b3..5c75840e 100644 --- a/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c +++ b/src/osmo-bts-sysmo/misc/sysmobts_mgr_vty.c @@ -170,6 +170,8 @@ static void write_action(struct vty *vty, const char *name, int actions) #endif vty_out(vty, " %spa-off%s", (actions & TEMP_ACT_PA_OFF) ? "" : "no ", VTY_NEWLINE); + vty_out(vty, " %sbts-service-off%s", + (actions & TEMP_ACT_BTS_SRV_OFF) ? "" : "no ", VTY_NEWLINE); } static int config_write_mgr(struct vty *vty) @@ -257,6 +259,24 @@ DEFUN(cfg_no_action_pa_off, cfg_no_action_pa_off_cmd, return CMD_SUCCESS; } +DEFUN(cfg_action_bts_srv_off, cfg_action_bts_srv_off_cmd, + "bts-service-off", + "Stop the systemd sysmobts.service\n") +{ + int *action = vty->index; + *action |= TEMP_ACT_BTS_SRV_OFF; + return CMD_SUCCESS; +} + +DEFUN(cfg_no_action_bts_srv_off, cfg_no_action_bts_srv_off_cmd, + "no bts-service-off", + NO_STR "Stop the systemd sysmobts.service\n") +{ + int *action = vty->index; + *action &= ~TEMP_ACT_BTS_SRV_OFF; + return CMD_SUCCESS; +} + DEFUN(show_mgr, show_mgr_cmd, "show manager", SHOW_STR "Display information about the manager") { @@ -327,6 +347,8 @@ static void register_action(int act) #endif install_element(act, &cfg_action_pa_off_cmd); install_element(act, &cfg_no_action_pa_off_cmd); + install_element(act, &cfg_action_bts_srv_off_cmd); + install_element(act, &cfg_no_action_bts_srv_off_cmd); } int sysmobts_mgr_vty_init(void) |