aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2012-09-20 16:04:54 +0200
committerHolger Hans Peter Freyther <zecke@selfish.org>2012-09-20 16:06:56 +0200
commit778695d0b42fe2c264f7566ef7d1f31bf5cdce7c (patch)
tree45f937c0d444e415cb70660cfb3550b40aaf3c52
parent221ff66327fbbe0a0b2243e9b61626f9fdd31da8 (diff)
mgcp: Add the disable color option to the mgcp binary
-rw-r--r--openbsc/contrib/systemd/osmo-bsc-mgcp.service2
-rw-r--r--openbsc/src/osmo-bsc_mgcp/mgcp_main.c5
2 files changed, 6 insertions, 1 deletions
diff --git a/openbsc/contrib/systemd/osmo-bsc-mgcp.service b/openbsc/contrib/systemd/osmo-bsc-mgcp.service
index b5e8ec3d0..4b3df2c06 100644
--- a/openbsc/contrib/systemd/osmo-bsc-mgcp.service
+++ b/openbsc/contrib/systemd/osmo-bsc-mgcp.service
@@ -4,6 +4,6 @@ Description=OpenBSC MGCP
[Service]
Type=simple
Restart=always
-ExecStart=/usr/bin/osmo-bsc_mgcp -c /etc/osmocom/osmo-bsc-mgcp.cfg
+ExecStart=/usr/bin/osmo-bsc_mgcp -s -c /etc/osmocom/osmo-bsc-mgcp.cfg
Restart=always
RestartSec=2
diff --git a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
index 6f22f9060..540f7602b 100644
--- a/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
+++ b/openbsc/src/osmo-bsc_mgcp/mgcp_main.c
@@ -80,6 +80,7 @@ static void print_help()
printf("Some useful help...\n");
printf(" -h --help is printing this text.\n");
printf(" -c --config-file filename The config file to use.\n");
+ printf(" -s --disable-color\n");
printf(" -D --daemonize Fork the process into a background daemon\n");
printf(" -V --version Print the version number\n");
}
@@ -93,6 +94,7 @@ static void handle_options(int argc, char **argv)
{"config-file", 1, 0, 'c'},
{"daemonize", 0, 0, 'D'},
{"version", 0, 0, 'V'},
+ {"disable-color", 0, 0, 's'},
{0, 0, 0, 0},
};
@@ -109,6 +111,9 @@ static void handle_options(int argc, char **argv)
case 'c':
config_file = talloc_strdup(tall_bsc_ctx, optarg);
break;
+ case 's':
+ log_set_use_color(osmo_stderr_target, 0);
+ break;
case 'V':
print_version(1);
exit(0);