diff --git a/.gitignore b/.gitignore
index 0c2ce5d..dcbce64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@ build
 dist
 rpm-build
 MANIFEST
+*~
diff --git a/hooks/post-koji-build/testlist b/hooks/post-koji-build/testlist
index d0a9b73..0b5a9f3 100644
--- a/hooks/post-koji-build/testlist
+++ b/hooks/post-koji-build/testlist
@@ -1,2 +1,3 @@
 rpmlint
 rpmguard
+initscripts
diff --git a/tests/initscripts/control b/tests/initscripts/control
new file mode 100644
index 0000000..fec4fc0
--- /dev/null
+++ b/tests/initscripts/control
@@ -0,0 +1,17 @@
+# vim: set syntax=python
+TIME="SHORT"
+AUTHOR = "Josef Skladanka <jskladan@redhat.com>"
+DOC = """
+Initscript checker, which uses Beakerlib based tests from RHEL BaseOS
+"""
+NAME = 'initscripts'
+TEST_TYPE = 'CLIENT' # SERVER can be used for tests that need multiple machines
+TEST_CLASS = 'General'
+TEST_CATEGORY = 'Functional'
+
+# post-koji-build tests can expect the following variables from autoqa:
+# envr: package ENVR (required, epoch can be skipped)
+# name: package name
+# kojitag: koji tag applied to this package
+
+job.run_test('initscripts', name=name, envr=envr, kojitag=kojitag, config=autoqa_conf)
diff --git a/tests/initscripts/initscripts.py b/tests/initscripts/initscripts.py
new file mode 100644
index 0000000..634a04d
--- /dev/null
+++ b/tests/initscripts/initscripts.py
@@ -0,0 +1,168 @@
+#
+# Copyright 2010, Red Hat, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Author: Josef Skladanka <jskladan@redhat.com>
+
+import os
+import shutil
+import subprocess
+import re
+import autoqa.koji_utils
+import autoqa.util
+import koji
+from autotest_lib.client.bin import test, utils
+from autotest_lib.client.bin.test_config import config_loader
+from autotest_lib.client.common_lib import error
+
+class initscripts(test.test):
+    version = 1 # increment if setup() changes
+
+    def initialize(self, envr, name, kojitag, config):
+        self.config = config_loader(config, self.tmpdir)
+
+    def setup(self):
+        """
+        adds beakerlib repository and installs beakerlib
+        """
+        retval = subprocess.call(["grep", "-R", "http://afri.fedorapeople.org/beakerlib/", "/etc/yum.repos.d/"])
+        if retval != 0:
+            f = open("/etc/yum.repos.d/beakerlib.repo", "w")
+            f.write("[beakerlib-testing]\nname=Testing repo for BeakerLib\nbaseurl=http://afri.fedorapeople.org/beakerlib/\nenabled=1\ngpgcheck=0\n")
+            f.close()
+        utils.system('yum -y install beakerlib') 
+
+    def run_beakerlib_test(self, name, path_to_runtest):
+        #install required packages
+        """
+        there are lines like
+          @echo "Requires:        openssh" >> $(METADATA)
+        in the Makefile, specifying which packages are needed to run the respective test.
+        this code extracts package names from these lines and installs the packages
+
+        We also want to skip the "Requires" line with the package name, since it was installed
+         from koji. Makefile has "RunFor" line, which specifies this package name.
+        """
+        makefile = os.path.join(path_to_runtest, "Makefile")
+        if (os.path.isfile(makefile)):
+            #grab the Requires lines
+            req_lines = filter(lambda x: x.find("Requires:") > -1, open(makefile, 'r').readlines())
+            requires = map(lambda x: re.findall(".*Requires:\s*([^\"']+).*", x)[0], req_lines)
+
+            #grab the RunFor lines
+            run_for_lines = filter(lambda x: x.find("RunFor:") > -1, open(makefile, 'r').readlines())
+            run_for = map(lambda x: re.findall(".*RunFor:\s*([^\"']+).*", x)[0], run_for_lines)
+
+            #filter out RunFor from Requires, as RunFor was installed from koji
+            requires = filter(lambda x: x not in run_for, requires)
+            if len(requires) > 0:
+                utils.system("yum -y install %s" % " ".join(requires))
+
+        #run the test
+        cmd = os.path.join(path_to_runtest, "runtest.sh")
+        result = utils.run(cmd, ignore_status = True, stdout_tee = utils.TEE_TO_LOGS)
+        self.results += result.stdout
+
+        #store the log journal created by beakerlib
+        """
+        filters lines containing information about journal files (logs from the test script)
+        :: [15:22:06] ::  JOURNAL XML: /tmp/beakerlib-CoEg7JM/journal.xml
+        :: [15:22:06] ::  JOURNAL TXT: /tmp/beakerlib-CoEg7JM/journal.txt
+        extracts paths to these files, ands stores the files in self.resultsdir
+        """
+        journal_lines = filter(lambda x: x.find("JOURNAL") > -1, self.results.splitlines())
+        journal_files = map(lambda x: x.split(':')[-1].strip(), journal_lines)
+        for fname in journal_files:
+            shutil.copy(fname, os.path.join(self.resultsdir, "journal_%s.%s" % (name, fname.split('.')[-1])))
+
+        return result.exit_status
+
+
+
+
+    def run_once(self, envr, name, kojitag):
+        """
+        name - name of the package for initscript test
+        """
+
+        #find all tests for package $name
+        testdir = os.path.join(self.bindir, "./tests/%s" % name)
+        tests = []
+        if (os.path.isdir(testdir)):
+            """
+            walks through ./tests/$NAME and all it's subdirs. Every time it finds
+            file runtest.sh, it stores a tuple(test_name, path) to tests[],
+            where test_name is 'openssh' for ./tests/openssh, openssh_subdir for ./tests/openssh/subdir, etc.
+            """
+            for (path, dirs, files) in os.walk(testdir):
+                if "runtest.sh" in files:
+                    test_name = path.replace(os.path.join(self.bindir, "./tests/"), "").replace(os.path.sep, "_")
+                    tests.append((test_name, path))
+        else:
+            raise error.TestWarn("No initscript checker found for package %s" % name)
+
+
+        #install packages from koji (stolen from rpmlint test)
+        koji = autoqa.koji_utils.SimpleKojiClientSession()
+        pkgurls = koji.nvr_to_urls(envr, arches = os.uname()[-1])
+        rpmdir = os.path.join(self.tmpdir, 'rpms')
+        os.makedirs(rpmdir)
+        rpms = []
+        print "Saving RPMs to %s" % rpmdir
+        #download packages
+        for p in pkgurls:
+            # fetch package to rpmdir
+            print "Grabbing %s" % p
+            localfile = os.path.join(rpmdir, os.path.basename(p))
+            autoqa.util.grabber.urlgrab(p, localfile)
+            rpms.append(localfile)
+        #and install them
+        cmd = "yum -y --nogpgcheck localinstall %s" % " ".join(rpms)
+        utils.system_output(cmd)
+
+        #sort tests alphabetically by test_name
+        tests.sort(key = lambda x: x[0])
+        self.results = ""
+        tests_exit_status = []
+        for test in tests:
+            self.results += "RUNNING: %s\n%s\n" % (test[0], "=" * len("RUNNING: %s" % test[0]))
+            tests_exit_status.append((test[0], self.run_beakerlib_test(test[0], test[1])))
+            self.results += "\n"
+
+
+        tests_exit_status_nonzero = filter(lambda x: x[1] != 0, tests_exit_status)
+        tests_exit_status_zero = filter(lambda x: x[1] == 0, tests_exit_status)
+
+        #send email with results
+        mail_to = self.config.get('test', 'result_email')
+        mail_from = self.config.get('test', 'mail_from')
+        mail_server = self.config.get('test', 'smtpserver')
+        if (mail_to and mail_from and mail_server):
+            msg =  "Following tests returned zero exit code: %s\n" % repr(tests_exit_status_zero)
+            msg += "Following tests returned NON-zero exit code: %s\n" % repr(tests_exit_status_nonzero)
+            msg += "%s\n" % ("#" * 79,)
+
+            print "Sending email with results to '%s' ..." % mail_to
+            utils.send_email(mail_to = mail_to,
+                             mail_from = mail_from,
+                             mail_server = mail_server,
+                             subject = 'initscripts: %d PASSED, %d FAILED for package %s' % (len(tests_exit_status_zero), len(tests_exit_status_nonzero), envr),
+                             body = msg + self.results)
+
+        if len(tests_exit_status_nonzero) > 0:
+             msg = "Following tests returned non-zero exit code: %s" % repr(tests_exit_status_nonzero)
+             raise error.TestError(msg)
+
diff --git a/tests/initscripts/tests/at/Makefile b/tests/initscripts/tests/at/Makefile
new file mode 100644
index 0000000..dbb70fc
--- /dev/null
+++ b/tests/initscripts/tests/at/Makefile
@@ -0,0 +1,64 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Makefile of /CoreOS/at/Sanity/initscript
+#   Description: Initscript sanity
+#   Author: Radek Biba <rbiba@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/at/Sanity/initscript
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	chmod a+x runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+	@echo "Owner:           Radek Biba <rbiba@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     Initscript sanity" >> $(METADATA)
+	@echo "Type:            Sanity" >> $(METADATA)
+	@echo "TestTime:        5m" >> $(METADATA)
+	@echo "Releases:	-RHEL3 -RHEL4 -RHELServer5 -RHELClient5" >> $(METADATA)
+	@echo "RunFor:          at" >> $(METADATA)
+	@echo "Requires:        at" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+
+	rhts-lint $(METADATA)
diff --git a/tests/initscripts/tests/at/PURPOSE b/tests/initscripts/tests/at/PURPOSE
new file mode 100644
index 0000000..7845ec7
--- /dev/null
+++ b/tests/initscripts/tests/at/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/at/Sanity/initscript
+Description: Initscript sanity
+Author: Radek Biba <rbiba@redhat.com>
diff --git a/tests/initscripts/tests/at/runtest.sh b/tests/initscripts/tests/at/runtest.sh
new file mode 100755
index 0000000..c97a0ce
--- /dev/null
+++ b/tests/initscripts/tests/at/runtest.sh
@@ -0,0 +1,82 @@
+#!/bin/bash
+# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/at/Sanity/initscript
+#   Description: Initscript sanity
+#   Author: Radek Biba <rbiba@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include rhts environment
+#. /usr/bin/rhts-environment.sh
+#. /usr/share/rhts-library/rhtslib.sh
+. /usr/share/beakerlib/beakerlib.sh
+
+PACKAGE="at"
+SERVICE="atd"
+
+rlJournalStart
+    rlPhaseStartSetup "Prepare"
+        rlServiceStop $SERVICE
+    rlPhaseEnd
+
+    rlPhaseStartTest "Mandatory actions"
+        for ACTION in "start" "stop" "restart" "force-reload" "status" ; do
+            rlRun "grep -i \"usage.*$ACTION\" /etc/init.d/$SERVICE"
+        done
+    rlPhaseEnd
+    rlPhaseStartTest "Start"
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE restart" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE force-reload" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE try-restart" 0
+        rlRun "service $SERVICE status" 0
+    rlPhaseEnd
+    rlPhaseStartTest "Stop"
+        rlRun "service $SERVICE stop" 0
+        rlRun "service $SERVICE status" 3
+        rlRun "service $SERVICE stop" 0
+        rlRun "service $SERVICE status" 3
+        rlRun "service $SERVICE try-restart" 0
+        rlRun "service $SERVICE status" 3
+    rlPhaseEnd
+    rlPhaseStartTest "Dead service"
+        rlRun "touch /var/lock/subsys/$SERVICE"
+        rlRun "service $SERVICE status" 2
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE status" 0
+    rlPhaseEnd
+    rlPhaseStartTest "Invalid arguments"
+        rlRun "service $SERVICE" 2
+        rlRun "service $SERVICE fubar" 2
+    rlPhaseEnd
+
+    rlPhaseStartCleanup "Restore"
+        rlServiceRestore $SERVICE
+    rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/initscripts/tests/openssh/Makefile b/tests/initscripts/tests/openssh/Makefile
new file mode 100644
index 0000000..328387d
--- /dev/null
+++ b/tests/initscripts/tests/openssh/Makefile
@@ -0,0 +1,64 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Makefile of /CoreOS/openssh/Sanity/init-scripts-LSB
+#   Description: init scripts must meet LSB specifications
+#   Author: Milos Malik <mmalik@redhat.com>
+#   Author: Miroslav Vadkerti <mvadkert@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/openssh/Sanity/init-scripts-LSB
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	chmod a+x runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+	@echo "Owner:           Miroslav Vadkerti <mvadkert@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     init scripts must meet LSB specifications" >> $(METADATA)
+	@echo "Type:            Sanity" >> $(METADATA)
+	@echo "TestTime:        5m" >> $(METADATA)
+	@echo "RunFor:          openssh" >> $(METADATA)
+	@echo "Requires:        openssh" >> $(METADATA)
+	@echo "Requires:        initscripts" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+
+	rhts-lint $(METADATA)
diff --git a/tests/initscripts/tests/openssh/PURPOSE b/tests/initscripts/tests/openssh/PURPOSE
new file mode 100644
index 0000000..d3fb7f8
--- /dev/null
+++ b/tests/initscripts/tests/openssh/PURPOSE
@@ -0,0 +1,7 @@
+PURPOSE of /CoreOS/openssh/Sanity/init-scripts-LSB
+
+Description: init scripts must meet LSB specifications
+
+Author: Milos Malik <mmalik@redhat.com>
+Author: Miroslav Vadkerti <mvadkert@redhat.com>
+
diff --git a/tests/initscripts/tests/openssh/runtest.sh b/tests/initscripts/tests/openssh/runtest.sh
new file mode 100755
index 0000000..2d8c370
--- /dev/null
+++ b/tests/initscripts/tests/openssh/runtest.sh
@@ -0,0 +1,102 @@
+#!/bin/bash
+# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/openssh/Sanity/init-scripts-LSB
+#   Description: init scripts must meet LSB specifications
+#   Author: Milos Malik <mmalik@redhat.com>
+#   Author: Miroslav Vadkerti <mmvadkert@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include rhts environment
+#. /usr/bin/rhts-environment.sh
+#. /usr/share/rhts-library/rhtslib.sh
+. /usr/share/beakerlib/beakerlib.sh
+
+
+PACKAGE="openssh"
+SERVICE="sshd"
+
+rlJournalStart
+    rlPhaseStartSetup
+        rlAssertRpm $PACKAGE
+        USAGE_FILE=`mktemp`
+        CASE_FILE=`mktemp`
+        rlServiceStop $SERVICE
+    rlPhaseEnd
+
+    rlPhaseStartTest "Mandatory actions"
+        for ACTION in "start" "stop" "restart" "force-reload" "status" ; do
+            rlRun "grep -i \"usage.*$ACTION\" /etc/init.d/$SERVICE"
+        done
+    rlPhaseEnd
+
+    rlPhaseStartTest "Recognized actions"
+        LINES_COUNT=`wc -l < /etc/init.d/$SERVICE`
+        LAST_CASE=`grep -n case /etc/init.d/$SERVICE | tail -n 1 | cut -d ':' -f 1`
+        rlRun "tail -n $((LINES_COUNT - LAST_CASE)) /etc/init.d/$SERVICE | grep '[ 	]*[|a-zA-Z-]*)' | cut -d ')' -f 1 | tr '|' '\n' | tr -d ' 	' | grep -v '*' | grep -v '\\$' | sed 's/\t//g' | sort > $CASE_FILE"
+        rlRun "grep -i usage /etc/init.d/$SERVICE | cut -d '{' -f 2 | tr -d '}\"' | tr '|' '\n' | sort > $USAGE_FILE"
+        rlRun "diff $CASE_FILE $USAGE_FILE"
+    rlPhaseEnd
+
+    rlPhaseStartTest "Start"
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE status" 0
+        rlRun "service $SERVICE restart" 0
+        rlRun "service $SERVICE status" 0
+    rlPhaseEnd
+
+    rlPhaseStartTest "Stop"
+        rlRun "service $SERVICE stop" 0
+        rlRun "service $SERVICE status" 3
+        rlRun "service $SERVICE stop" 0
+        rlRun "service $SERVICE status" 3
+    rlPhaseEnd
+
+    rlPhaseStartTest "Lock file"
+        rlRun "touch /var/lock/subsys/$SERVICE"
+        rlRun "service $SERVICE status" 2
+        rlRun "rm -rf /var/lock/subsys/$SERVICE" 
+    rlPhaseEnd
+
+    rlPhaseStartTest "PID file"
+        rlRun "touch /var/run/$SERVICE.pid"
+        rlRun "service $SERVICE status" 1
+        rlRun "rm -rf /var/run/$SERVICE.pid"
+    rlPhaseEnd
+
+    rlPhaseStartTest "Condrestart"
+        rlRun "service $SERVICE start" 0
+        rlRun "service $SERVICE condrestart" 0
+        rlRun "service $SERVICE status" 0
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rm -f $USAGE_FILE
+        rm -f $CASE_FILE
+        rlServiceRestore $SERVICE
+    rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
+
diff --git a/tests/initscripts/tests/samba/Makefile b/tests/initscripts/tests/samba/Makefile
new file mode 100644
index 0000000..af50041
--- /dev/null
+++ b/tests/initscripts/tests/samba/Makefile
@@ -0,0 +1,65 @@
+# Makefile - init-script-exit-codes
+# Author: Ales Zelinka <azelinka@redhat.com>
+# Location: /CoreOS/samba/Regression/init-script-exit-codes/Makefile
+
+# Description: tests if samba's init scripts gives propper exit codes
+
+# Copyright (c) 2008 Red Hat, Inc. All rights reserved. This copyrighted material 
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ 
+
+
+TOPLEVEL_NAMESPACE=/CoreOS
+PACKAGE_NAME=samba
+RELATIVE_PATH=Sanity/init-script-exit-codes
+
+export TEST=/CoreOS/samba/Sanity/init-script-exit-codes
+export TESTVERSION=1.2
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	chmod a+x ./runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+
+$(METADATA): Makefile
+	@echo "Owner:           Ales Zelinka <azelinka@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     tests if samba" >> $(METADATA)
+	@echo "Type:            Sanity" >> $(METADATA)
+	@echo "TestTime:        7m" >> $(METADATA)
+	@echo "RunFor:          samba" >> $(METADATA)
+	@echo "Requires:        samba" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+	@echo "Bug:             530954" >> $(METADATA)
+	@echo "Releases:        -RHEL3" >> $(METADATA)
+
+	rhts-lint $(METADATA)
diff --git a/tests/initscripts/tests/samba/PURPOSE b/tests/initscripts/tests/samba/PURPOSE
new file mode 100644
index 0000000..aa02091
--- /dev/null
+++ b/tests/initscripts/tests/samba/PURPOSE
@@ -0,0 +1,8 @@
+Test Name: init-script-exit-codes
+Author: Ales Zelinka <azelinka@redhat.com>
+Location: /CoreOS/samba/Sanity/init-script-exit-codes
+
+Short Description: tests if samba's init scripts gives proper exit codes
+This tests also works as a regression test for 
+bug #182560   -  Wrong retval for initscript when smbd is dead  
+
diff --git a/tests/initscripts/tests/samba/runtest.sh b/tests/initscripts/tests/samba/runtest.sh
new file mode 100755
index 0000000..92b9262
--- /dev/null
+++ b/tests/initscripts/tests/samba/runtest.sh
@@ -0,0 +1,109 @@
+# Makefile - init-script-exit-codes
+# Author: Ales Zelinka <azelinka@redhat.com>
+# Location: /CoreOS/samba/Regression/init-script-exit-codes/Makefile
+
+# Description: checks initscripts of samba daemons
+
+# Copyright (c) 2008 Red Hat, Inc. All rights reserved. This copyrighted material 
+# is made available to anyone wishing to use, modify, copy, or
+# redistribute it subject to the terms and conditions of the GNU General
+# Public License v.2.
+#
+# This program is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+PACKAGE=samba
+
+NAME=`basename $TEST`
+
+# Include rhts environment
+#. /usr/share/rhts-library/rhtslib.sh
+#. /usr/bin/rhts-environment.sh
+. /usr/share/beakerlib/beakerlib.sh
+
+rlJournalStart
+rlPhaseStartSetup Setup
+    rlAssertRpm $PACKAGE
+rlPhaseEnd
+
+for SERVICE in smb nmb winbind  ; do
+    if ! chkconfig --list $SERVICE ; then
+        rlLogError "service $SERVICE doesn't exist"
+        continue
+    fi
+rlPhaseStartSetup Setup-$SERVICE
+    #stop it to have consistent starting position
+    rlServiceStop $SERVICE
+    sleep 2
+rlPhaseEnd
+
+rlPhaseStartTest Test-$SERVICE-start-stop
+    ps -A |grep -v grep |grep ${SERVICE}d ; rlAssertNotEquals "$SERVICE processes not running before startup" $? 0
+    rlRun "service $SERVICE start" 0 "service $SERVICE start returns 0"
+    sleep 5
+    ps -A |grep -v grep |grep ${SERVICE}d ; rlAssert0 "$SERVICE processes running after start" $?
+    sleep 2
+    rlRun "service $SERVICE status" 0 "service $SERVICE status reported as running" $?
+    rlRun "service $SERVICE start" 0 "service $SERVICE 2nd start returns 0"
+    rlRun "service $SERVICE status" 0 "service $SERVICE status still reported as running" $?
+    sleep 2
+    rlRun "service $SERVICE stop" 0 "service $SERVICE stop returns 0"
+    sleep 20
+    rlRun "service $SERVICE status" 3 "service $SERVICE status reported as stopped (ECODE 3)" $?
+    sleep 2
+    #this fails on rhel4 but is not serious enough to fix - skipping for this test to remain useful
+    rlIsRHEL 4 ||rlRun "service $SERVICE stop" 0 "service $SERVICE 2nd stop returns 0"
+    sleep 2
+    rlRun "service $SERVICE status" 3 "service $SERVICE status still reported as stopped (ECODE 3)" $?
+    sleep 2
+    ps -A |grep -v grep |grep ${SERVICE}d ; rlAssertNotEquals "no processes running for service $SERVICE" 0 $?
+    rlRun "service $SERVICE start" 0
+    sleep 5
+rlPhaseEnd
+rlPhaseStartTest Test-$SERVICE-restart-condrestart
+    SERVICE_PID_A=`cat /var/run/${SERVICE}d.pid`
+    rlLog "service $SERVICE PID: $SERVICE_PID" SERVICE
+    rlRun "service $SERVICE restart" 0 "service $SERVICE restart returns 0"
+    sleep 5
+    SERVICE_PID_B=`cat /var/run/${SERVICE}d.pid`
+    rlRun "[ \"$SERVICE_PID_A\" -ne \"$SERVICE_PID_B\" ] " 0 " PID of service $SERVICE changed during restart"
+    rlRun "service $SERVICE status" 0 "service $SERVICE status reported as running" $?
+    rlRun "service $SERVICE condrestart" 0 "service $SERVICE condrestart returns 0"
+    sleep 5
+    SERVICE_PID_A=`cat /var/run/${SERVICE}d.pid`
+    rlRun "[ \"$SERVICE_PID_A\" -ne \"$SERVICE_PID_B\" ] " 0 " PID of service $SERVICE changed during condrestart"
+    rlRun "service $SERVICE status" 0 "service $SERVICE status reported as running" $?
+    sleep 2
+rlPhaseEnd
+
+#only as part of rhel6/Fedora LSB compliance
+if rlIsRHEL 6 || rlIsFedora ; then
+rlPhaseStartTest Test-$SERVICE-pidfile-lockfile
+    #force kill the daemons and check if status reports it correctly
+    rlRun "killall -9 ${SERVICE}d " 0 "Killing service $SERVICE"
+    rlRun "service $SERVICE status" 1 "service $SERVICE status reports dead service but existing pidfile (ECODE 1)" $?
+    rlRun "service $SERVICE start" 0
+    sleep 5
+    #kill the daemons and check if status reports it correctly
+    rlRun "[ -f /var/lock/subsys/$SERVICE ]" 0 "subsystem lockfile exists"
+    rlRun "killall ${SERVICE}d " 0 "Killing service $SERVICE"
+    rlRun "service $SERVICE status" 2 "service $SERVICE status reports dead service but existing subsys lock(ECODE 2)" $?
+    sleep 2
+rlPhaseEnd
+fi
+
+rlPhaseStartCleanup CleanUp-$SERVICE
+    service $SERVICE restart
+    rlServiceRestore $SERVICE
+rlPhaseEnd
+
+done
+rlJournalEnd
+rlJournalPrintText
+
diff --git a/tests/initscripts/tests/spamassassin/Makefile b/tests/initscripts/tests/spamassassin/Makefile
new file mode 100644
index 0000000..264c252
--- /dev/null
+++ b/tests/initscripts/tests/spamassassin/Makefile
@@ -0,0 +1,64 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Makefile of /CoreOS/spamassassin/Sanity/init-script-exit-codes
+#   Description: init script LSB compliance test
+#   Author: Ales Zelinka <azelinka@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/spamassassin/Sanity/init-script-exit-codes
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	chmod a+x runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+	@echo "Owner:           Ales Zelinka <azelinka@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     init script LSB compliance test" >> $(METADATA)
+	@echo "Type:            Sanity" >> $(METADATA)
+	@echo "TestTime:        10m" >> $(METADATA)
+	@echo "RunFor:          spamassassin" >> $(METADATA)
+	@echo "Requires:        spamassassin" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+	@echo "Bug:             530957" >> $(METADATA)
+
+	rhts-lint $(METADATA)
diff --git a/tests/initscripts/tests/spamassassin/PURPOSE b/tests/initscripts/tests/spamassassin/PURPOSE
new file mode 100644
index 0000000..494c24b
--- /dev/null
+++ b/tests/initscripts/tests/spamassassin/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/spamassassin/Sanity/init-script-exit-codes
+Description: init script LSB compliance test
+Author: Ales Zelinka <azelinka@redhat.com>
diff --git a/tests/initscripts/tests/spamassassin/runtest.sh b/tests/initscripts/tests/spamassassin/runtest.sh
new file mode 100755
index 0000000..4835c96
--- /dev/null
+++ b/tests/initscripts/tests/spamassassin/runtest.sh
@@ -0,0 +1,69 @@
+#!/bin/bash
+# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/spamassassin/Sanity/init-script-exit-codes
+#   Description: init script LSB compliance test
+#   Author: Ales Zelinka <azelinka@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include rhts environment
+#. /usr/bin/rhts-environment.sh
+#. /usr/share/rhts-library/rhtslib.sh
+. /usr/share/beakerlib/beakerlib.sh
+
+PACKAGE="spamassassin"
+SERVICE="spamassassin"
+
+rlJournalStart
+rlPhaseStartSetup
+    rlAssertRpm $PACKAGE
+    rlServiceStop $SERVICE
+rlPhaseEnd
+rlPhaseStartTest "Start"
+    rlRun "service $SERVICE start" 0
+    rlRun "service $SERVICE status" 0
+    rlRun "service $SERVICE start" 0
+    rlRun "service $SERVICE status" 0
+    rlRun "service $SERVICE restart" 0
+    rlRun "service $SERVICE status" 0
+rlPhaseEnd
+rlPhaseStartTest "Stop"
+    rlRun "service $SERVICE stop" 0
+    rlRun "service $SERVICE status" 3
+    rlRun "service $SERVICE stop" 0
+    rlRun "service $SERVICE status" 3
+rlPhaseEnd
+rlPhaseStartTest "Lock file"
+    rlRun "touch /var/lock/subsys/$SERVICE"
+    rlRun "service $SERVICE status" 2
+rlPhaseEnd
+rlPhaseStartTest "restarts-reloads"
+    rlRun "service $SERVICE condrestart" 0
+    rlRun "service $SERVICE status" 0
+    rlRun "service $SERVICE force-reload" 0
+rlPhaseEnd
+rlPhaseStartCleanup
+    rlServiceRestore $SERVICE
+rlPhaseEnd
+rlJournalPrintText
+rlJournalEnd
diff --git a/tests/initscripts/tests/udev/Makefile b/tests/initscripts/tests/udev/Makefile
new file mode 100644
index 0000000..1787557
--- /dev/null
+++ b/tests/initscripts/tests/udev/Makefile
@@ -0,0 +1,63 @@
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Makefile of /CoreOS/udev/Sanity/init-script-LSB
+#   Description: Init script should meet LSB specifications
+#   Author: Yulia Kopkova <ykopkova@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+export TEST=/CoreOS/udev/Sanity/init-script-LSB
+export TESTVERSION=1.0
+
+BUILT_FILES=
+
+FILES=$(METADATA) runtest.sh Makefile PURPOSE
+
+.PHONY: all install download clean
+
+run: $(FILES) build
+	./runtest.sh
+
+build: $(BUILT_FILES)
+	chmod a+x runtest.sh
+
+clean:
+	rm -f *~ $(BUILT_FILES)
+
+
+include /usr/share/rhts/lib/rhts-make.include
+
+$(METADATA): Makefile
+	@echo "Owner:           Yulia Kopkova <ykopkova@redhat.com>" > $(METADATA)
+	@echo "Name:            $(TEST)" >> $(METADATA)
+	@echo "TestVersion:     $(TESTVERSION)" >> $(METADATA)
+	@echo "Path:            $(TEST_DIR)" >> $(METADATA)
+	@echo "Description:     Init script should meet LSB specifications" >> $(METADATA)
+	@echo "Type:            Sanity" >> $(METADATA)
+	@echo "TestTime:        5m" >> $(METADATA)
+	@echo "RunFor:          udev" >> $(METADATA)
+	@echo "Requires:        udev" >> $(METADATA)
+	@echo "Priority:        Normal" >> $(METADATA)
+	@echo "License:         GPLv2" >> $(METADATA)
+	@echo "Confidential:    no" >> $(METADATA)
+	@echo "Destructive:     no" >> $(METADATA)
+
+	rhts-lint $(METADATA)
diff --git a/tests/initscripts/tests/udev/PURPOSE b/tests/initscripts/tests/udev/PURPOSE
new file mode 100644
index 0000000..e5ada56
--- /dev/null
+++ b/tests/initscripts/tests/udev/PURPOSE
@@ -0,0 +1,3 @@
+PURPOSE of /CoreOS/udev/Sanity/init-script-LSB
+Description: Init script should meet LSB specifications
+Author: Yulia Kopkova <ykopkova@redhat.com>
diff --git a/tests/initscripts/tests/udev/runtest.sh b/tests/initscripts/tests/udev/runtest.sh
new file mode 100755
index 0000000..f88f1b1
--- /dev/null
+++ b/tests/initscripts/tests/udev/runtest.sh
@@ -0,0 +1,81 @@
+#!/bin/bash
+# vim: dict=/usr/share/rhts-library/dictionary.vim cpt=.,w,b,u,t,i,k
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   runtest.sh of /CoreOS/udev/Sanity/init-script-LSB
+#   Description: Init script should meet LSB specifications
+#   Author: Jan Scotka <jscotka@redhat.com>, Yulia Kopkova <ykopkova@redhat.com>
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#
+#   Copyright (c) 2009 Red Hat, Inc. All rights reserved.
+#
+#   This copyrighted material is made available to anyone wishing
+#   to use, modify, copy, or redistribute it subject to the terms
+#   and conditions of the GNU General Public License version 2.
+#
+#   This program is distributed in the hope that it will be
+#   useful, but WITHOUT ANY WARRANTY; without even the implied
+#   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+#   PURPOSE. See the GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public
+#   License along with this program; if not, write to the Free
+#   Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+#   Boston, MA 02110-1301, USA.
+#
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# Include rhts environment
+#. /usr/bin/rhts-environment.sh
+#. /usr/share/rhts-library/rhtslib.sh
+
+. /usr/share/beakerlib/beakerlib.sh
+
+PACKAGE="udev"
+
+SERVICE="udev-post"
+
+rlJournalStart
+    
+    rlPhaseStartSetup
+        rlAssertRpm $PACKAGE
+        rlRun "useradd testuserqa" 0 "Add test user"
+        rlServiceStop $SERVICE
+    rlPhaseEnd
+
+    rlPhaseStartTest
+
+        rlLog ">>>>>>>>> service start"
+        rlRun "service $SERVICE start" 0 " Service must start without problem"
+
+        rlLog ">>>>>>>>> service stop"
+        rlRun "service $SERVICE stop" 0 " Stopping service "
+        rlRun "service $SERVICE status" 3 " Status of stopped service "
+
+#        Could fail because in one case start action do not create a lock file
+#        rlLog ">>>>>>>>> lock file"
+#        rlServiceStart $SERVICE
+#        rlAssertExists "/var/lock/subsys/$SERVICE" "Lock file /var/lock/subsys/$SERVICE must exist"
+
+        rlLog ">>>>>>>>> insufficient rights"
+        rlRun "su testuserqa -c 'service $SERVICE start'" 4 "Insufficient rights, starting service under nonprivileged user must fail"
+        rlRun "su testuserqa -c 'service $SERVICE stop'" 4 "Insufficient rights, stopping service under nonprivileged user must fail"
+        
+        rlLog ">>>>>>>>> operations"
+        rlRun "service $SERVICE start" 0 " Service have to implement start function "
+        rlRun "service $SERVICE status" 3 " Service have to implement status function "
+        rlRun "service $SERVICE reload" 0 " Service have to implement reload function "
+
+        rlLog ">>>>>>>>> nonexist operations"
+        rlRun "service $SERVICE noexistop" 2 " Testing proper return code when nonexisting function"
+
+    rlPhaseEnd
+
+    rlPhaseStartCleanup
+        rlServiceRestore $SERVICE
+        rlRun "userdel -fr testuserqa" 0 "Remove test user"
+    rlPhaseEnd
+
+rlJournalPrintText
+rlJournalEnd
