X-Git-Url: https://git.camperquake.de/gitweb.cgi?p=time-slider.git;a=blobdiff_plain;f=usr%2Fshare%2Ftime-slider%2Flib%2Fplugin%2Fpluginsmf.py~;fp=usr%2Fshare%2Ftime-slider%2Flib%2Fplugin%2Fpluginsmf.py~;h=0000000000000000000000000000000000000000;hp=e6c44df791af071a3c9858e351888ff13c4b89e7;hb=1af5ab1ed1c0a7bade946f5e257d6512cc846c27;hpb=d021224696e8524cab857c27370e33aeaf024130 diff --git a/usr/share/time-slider/lib/plugin/pluginsmf.py~ b/usr/share/time-slider/lib/plugin/pluginsmf.py~ deleted file mode 100644 index e6c44df..0000000 --- a/usr/share/time-slider/lib/plugin/pluginsmf.py~ +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/python2.6 -# -# CDDL HEADER START -# -# The contents of this file are subject to the terms of the -# Common Development and Distribution License (the "License"). -# You may not use this file except in compliance with the License. -# -# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE -# or http://www.opensolaris.org/os/licensing. -# See the License for the specific language governing permissions -# and limitations under the License. -# -# When distributing Covered Code, include this CDDL HEADER in each -# file and include the License file at usr/src/OPENSOLARIS.LICENSE. -# If applicable, add the following below this CDDL HEADER, with the -# fields enclosed by brackets "[]" replaced with your own identifying -# information: Portions Copyright [yyyy] [name of copyright owner] -# -# CDDL HEADER END -# - -import os -import sys -import subprocess -from os.path import abspath, dirname, join, pardir -sys.path.insert(0, join(dirname(__file__), pardir)) -print join (dirname(__file__), pardir) -from time_slider import smf, autosnapsmf, util - - -PLUGINBASEFMRI = "svc:/application/time-slider/plugin" -PLUGINPROPGROUP = "plugin" - -class PluginSMF(smf.SMFInstance): - - def __init__(self, instanceName): - smf.SMFInstance.__init__(self, instanceName) - self.triggerCommand = None - self.triggers = None - - def get_trigger_command(self): - # FIXME Use mutex locking for MT safety - if self.triggerCommand == None: - value = self.get_prop(PLUGINPROPGROUP, "trigger_command") - self.triggerCommand = value.strip() - return self.triggerCommand - - def get_trigger_list(self): - #FIXME Use mutex locking to make MT-safe - if self.triggers == None: - self.triggers = [] - value = self.get_prop(PLUGINPROPGROUP, "trigger_on") - - # Strip out '\' characters inserted by svcprop - triggerList = value.strip().replace('\\', '').split(',') - for trigger in triggerList: - self.triggers.append(trigger.strip()) - return self.triggers - - def get_verbose(self): - value = self.get_prop(PLUGINPROPGROUP, "verbose") - if value == "true": - return True - else: - return False -