Remove old argument style and legacy service file
With the bitbake recipe referencing the new service file, we can remove
the old one.
Tested-by: ensure that kcsbridged is running on boot.
Change-Id: Idbdaf99235eb8816b13c392237e91b149d65f2e4
Signed-off-by: Vernon Mauery <vernon.mauery@linux.intel.com>
diff --git a/kcsbridged.cpp b/kcsbridged.cpp
index 8367512..a37cf5f 100644
--- a/kcsbridged.cpp
+++ b/kcsbridged.cpp
@@ -306,37 +306,16 @@
} // namespace
-// this is a hack to allow the new thing run with the old service file
-// it will be removed once the bb file is updated to use the new service file
-#define ALLOW_OLD_ARGS 1
-
int main(int argc, char* argv[])
{
CLI::App app("KCS IPMI bridge");
std::string channel;
- app.add_option("-c,--channel", channel, "channel name. e.g., ipmi-kcs3");
+ app.add_option("-c,--channel", channel, "channel name. e.g., ipmi-kcs3")
+ ->required();
bool verbose = false;
app.add_option("-v,--verbose", verbose, "print more verbose output");
-#ifdef ALLOW_OLD_ARGS
- std::string device;
- app.add_option("--d,--device", device, "device name. e.g., /dev/ipmi-kcs3");
-#endif
CLI11_PARSE(app, argc, argv);
-#ifdef ALLOW_OLD_ARGS
- if (channel.size() == 0)
- {
- size_t start = device.rfind('/');
- if (start == std::string::npos)
- {
- log<level::ERR>("bad device option",
- entry("DEVICE=%s", device.c_str()));
- return EXIT_FAILURE;
- }
- channel = device.substr(start + 1);
- }
-#endif
-
// Connect to system bus
auto io = std::make_shared<boost::asio::io_context>();
sd_bus* dbus;
diff --git a/org.openbmc.HostIpmi.service b/org.openbmc.HostIpmi.service
deleted file mode 100644
index 328491f..0000000
--- a/org.openbmc.HostIpmi.service
+++ /dev/null
@@ -1,11 +0,0 @@
-[Unit]
-Description=Phosphor IPMI KCS DBus Bridge
-
-[Service]
-Restart=always
-ExecStart={bindir}/kcsbridged --d="/dev/{KCS_DEVICE}"
-Type=dbus
-BusName={BUSNAME}
-
-[Install]
-WantedBy=multi-user.target