--- /dev/null
+#! /bin/bash
+#
+# Copyright (c) 2012 Intel Corporation
+#
+# 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, 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 St, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+# Authors:
+# Brian McGillion <brian.mcgillion@intel.com>
+#
+# description: Initialize Smack policy
+### BEGIN INIT INFO
+# Provides: smack-utils
+# Required-Start: $local_fs
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Set up Smack policy
+# Description: Smack is an LSM that provides Mandatory Access Control.
+### END INIT INFO
+
+#
+# Mount smackfs in /smack
+#
+mount_smack() {
+ if [ ! -d /smack ] ; then
+ rm -f /smack
+ mkdir /smack
+ fi
+ mount -t smackfs smackfs /smack >& /dev/null
+}
+
+case "$1" in
+ start)
+ mount_smack
+ /usr/bin/smackctl apply
+ ;;
+ status)
+ if [ ! -e /smack/load2 ] ; then
+ exit -1
+ fi
+ ;;
+ reload|force-reload|restart|try-restart)
+ /usr/bin/smackctl clear
+ /usr/bin/smackctl apply
+ ;;
+ stop)
+ /usr/bin/smackctl clear
+ ;;
+ *)
+ ;;
+esac
+
+exit 0
\ No newline at end of file