diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-08-30 20:07:23 -0400 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2016-09-06 10:02:33 -0400 |
commit | e2c68b315fabf270b925c8c85aed5cfa907e77e8 (patch) | |
tree | aa7c50c1127631243295719f34bfe6a2e99b6e3d /pystatemgr | |
parent | 9a0aaed068d4bc9c491ce31ad2c1be7d63d6b00f (diff) | |
download | talos-skeleton-e2c68b315fabf270b925c8c85aed5cfa907e77e8.tar.gz talos-skeleton-e2c68b315fabf270b925c8c85aed5cfa907e77e8.zip |
Remove goto_system_state
With the move to systemd this script isn't needed anymore.
Change-Id: I90e481ccd720492fce25b62edc5e47d36d6d5a7c
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'pystatemgr')
-rw-r--r-- | pystatemgr/goto_system_state.py | 61 | ||||
-rw-r--r-- | pystatemgr/setup.py | 2 |
2 files changed, 1 insertions, 62 deletions
diff --git a/pystatemgr/goto_system_state.py b/pystatemgr/goto_system_state.py deleted file mode 100644 index 4efa1c6..0000000 --- a/pystatemgr/goto_system_state.py +++ /dev/null @@ -1,61 +0,0 @@ -#!/usr/bin/env python - -# Contributors Listed Below - COPYRIGHT 2016 -# [+] International Business Machines Corp. -# -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or -# implied. See the License for the specific language governing -# permissions and limitations under the License. - -import sys -import subprocess -import dbus -import dbus.service -import dbus.mainloop.glib -import gobject - - -class Goto(dbus.service.Object): - def __init__(self, connection, path, loop, state, cmdline): - super(Goto, self).__init__(connection, path) - self.loop = loop - self.state = state - self.cmdline = cmdline - gobject.idle_add(self.go) - - def go(self): - if self.cmdline: - subprocess.call(self.cmdline) - - if self.state: - self.GotoSystemState(self.state) - - self.loop.quit() - - @dbus.service.signal('org.openbmc.Control', signature='s') - def GotoSystemState(self, state): - pass - -if __name__ == '__main__': - dbus.mainloop.glib.DBusGMainLoop(set_as_default=True) - bus = dbus.SystemBus() - cmdline = None - state = None - - if len(sys.argv) > 1: - state = sys.argv[1] - if len(sys.argv) > 2: - cmdline = sys.argv[2:] - - loop = gobject.MainLoop() - o = Goto(bus, '/org/openbmc/goto', loop, state, cmdline) - loop.run() diff --git a/pystatemgr/setup.py b/pystatemgr/setup.py index 86c7471..24874ae 100644 --- a/pystatemgr/setup.py +++ b/pystatemgr/setup.py @@ -2,5 +2,5 @@ from distutils.core import setup setup(name='pystatemgr', version='1.0', - scripts=['discover_system_state.py', 'goto_system_state.py'], + scripts=['discover_system_state.py'], ) |