Misc s/func/certmaster/ replacements
[certmaster.git] / certmaster / minion / modules / reboot.py
1 # Copyright 2007, Red Hat, Inc
2 # James Bowes <jbowes@redhat.com>
3 #
4 # This software may be freely redistributed under the terms of the GNU
5 # general public license.
6 #
7 # You should have received a copy of the GNU General Public License
8 # along with this program; if not, write to the Free Software
9 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
10
11 import func_module
12 import sub_process
13
14 class Reboot(func_module.FuncModule):
15
16 version = "0.0.1"
17 api_version = "0.0.1"
18 description = "Reboots a machine."
19
20 def reboot(self, when='now', message=''):
21 return sub_process.call(["/sbin/shutdown", '-r', when, message])