summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBrian Cameron <brian.cameron@sun.com>2008-01-28 17:43:05 -0500
committerWilliam Jon McCann <mccann@jhu.edu>2008-01-28 17:43:05 -0500
commit5895396bc583ae08c5041f5b81f5f9d0a2888e22 (patch)
treecd7ab3be029f2b0fd6921a4a66c3937e3cb048aa /tools
parent96d613ee9a4850753e8f93113ab28ed3045f73f3 (diff)
make polkit optional and use RBAC on Solaris
This patch makes polkit an optional dependency. If present it builds with it. If not, polkit support is disabled. This patch also adds a --enable-rbac-shutdown=<key> option. If set, then ConsoleKit will allow shutdown/reboot if the user has the RBAC key authorization defined. For example, since the GDM GUI program runs as the "gdm" user, setting the key for the "gdm" user allows the login program to shutdown and reboot via ConsoleKit. Also this patch modifies the tools/solaris/ck-system-restart and tools/solaris/ck-system-stop scripts to call "/sbin/init 6" and "/sbin/init 5", which are the right commands for Solaris.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/solaris/ck-system-restart11
-rwxr-xr-xtools/solaris/ck-system-stop11
2 files changed, 2 insertions, 20 deletions
diff --git a/tools/solaris/ck-system-restart b/tools/solaris/ck-system-restart
index 8e0664e..c61799f 100755
--- a/tools/solaris/ck-system-restart
+++ b/tools/solaris/ck-system-restart
@@ -1,12 +1,3 @@
#!/bin/sh
-#Try for common tools
-if [ -x "/sbin/shutdown" ] ; then
- /sbin/shutdown -r now
- exit $?
-elif [ -x "/usr/sbin/shutdown" ] ; then
- /usr/sbin/shutdown -r now
- exit $?
-else
- exit 1
-fi
+/sbin/init 6
diff --git a/tools/solaris/ck-system-stop b/tools/solaris/ck-system-stop
index e26bca3..d5b2fde 100755
--- a/tools/solaris/ck-system-stop
+++ b/tools/solaris/ck-system-stop
@@ -1,12 +1,3 @@
#!/bin/sh
-#Try for common tools
-if [ -x "/sbin/shutdown" ] ; then
- /sbin/shutdown -h now
- exit $?
-elif [ -x "/usr/sbin/shutdown" ] ; then
- /usr/sbin/shutdown -h now
- exit $?
-else
- exit 1
-fi
+/sbin/init 5