diff options
author | William Jon McCann <mccann@jhu.edu> | 2008-01-22 17:03:46 -0500 |
---|---|---|
committer | William Jon McCann <mccann@jhu.edu> | 2008-01-22 17:43:22 -0500 |
commit | 5ce97e6f22fd25279793fbc75211d2e86413ae73 (patch) | |
tree | 5de0565516b1d90ed382dc5f0ed969c8e512706c /tools/solaris/ck-system-restart | |
parent | 2fba24e67597bf59ae00db2867df7a348c81b094 (diff) |
initial stop/restart support
Add Stop and Restart methods to the Manager object. We'll rename the
Manager object to System in the near future. Use libpolkit to
determine authorization.
Diffstat (limited to 'tools/solaris/ck-system-restart')
-rwxr-xr-x | tools/solaris/ck-system-restart | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/solaris/ck-system-restart b/tools/solaris/ck-system-restart new file mode 100755 index 0000000..8e0664e --- /dev/null +++ b/tools/solaris/ck-system-restart @@ -0,0 +1,12 @@ +#!/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 |