From 5895396bc583ae08c5041f5b81f5f9d0a2888e22 Mon Sep 17 00:00:00 2001 From: Brian Cameron Date: Mon, 28 Jan 2008 17:43:05 -0500 Subject: 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= 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. --- tools/solaris/ck-system-restart | 11 +---------- tools/solaris/ck-system-stop | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) (limited to 'tools') 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 -- cgit