1 |
gregzartman |
1.1 |
--- smeserver-adv-samba-0.1.0/root/etc/e-smith/events/actions/winbindd-service-status.safe_winbind 2008-10-14 23:55:59.000000000 -0700 |
2 |
|
|
+++ smeserver-adv-samba-0.1.0/root/etc/e-smith/events/actions/winbindd-service-status 2008-10-14 23:46:36.000000000 -0700 |
3 |
|
|
@@ -0,0 +1,40 @@ |
4 |
|
|
+#!/usr/bin/perl -w |
5 |
|
|
+#---------------------------------------------------------------------- |
6 |
|
|
+# winbindd service status |
7 |
|
|
+# Copyright (C) 2008-2009 Greg Zartman <greg@leiinc.com> |
8 |
|
|
+# |
9 |
|
|
+# This program is free software; you can redistribute it and/or modify |
10 |
|
|
+# it under the terms of the GNU General Public License as published by |
11 |
|
|
+# the Free Software Foundation; either version 2 of the License, or |
12 |
|
|
+# (at your option) any later version. |
13 |
|
|
+# |
14 |
|
|
+# This program is distributed in the hope that it will be useful, |
15 |
|
|
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 |
|
|
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 |
|
|
+# GNU General Public License or more details. |
18 |
|
|
+# |
19 |
|
|
+# You should have received a copy of the GNU General Public License |
20 |
|
|
+# along with this program; if not, write to the Free Software |
21 |
|
|
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
|
|
+#---------------------------------------------------------------------- |
23 |
|
|
+ |
24 |
|
|
+use strict; |
25 |
|
|
+use warnings; |
26 |
|
|
+use esmith::ConfigDB; |
27 |
|
|
+ |
28 |
|
|
+my $db = esmith::ConfigDB->open or die "Couldn't open ConfigDB\n"; |
29 |
|
|
+ |
30 |
|
|
+my $event = $ARGV[0]; |
31 |
|
|
+ |
32 |
|
|
+my $domain_role = $db->get_prop('smb','ServerRole') || 'WS'; |
33 |
|
|
+ |
34 |
|
|
+my $winbindd = $db->get('winbindd'); |
35 |
|
|
+ |
36 |
|
|
+exit unless $winbindd; |
37 |
|
|
+ |
38 |
|
|
+print $domain_role; |
39 |
|
|
+ |
40 |
|
|
+$winbindd->set_prop('status','enabled') |
41 |
|
|
+ if ($domain_role =~ /DM|ADM/); |
42 |
|
|
+ |
43 |
|
|
+exit 0; |
44 |
|
|
--- smeserver-adv-samba-0.1.0/root/etc/e-smith/db/configuration/defaults/winbindd/status.safe_winbind 2008-04-11 18:52:33.000000000 -0700 |
45 |
|
|
+++ smeserver-adv-samba-0.1.0/root/etc/e-smith/db/configuration/defaults/winbindd/status 2008-10-14 23:44:05.000000000 -0700 |
46 |
|
|
@@ -1 +1 @@ |
47 |
|
|
-enabled |
48 |
|
|
+disabled |
49 |
|
|
--- smeserver-adv-samba-0.1.0/createlinks.safe_winbind 2008-10-14 23:42:50.000000000 -0700 |
50 |
|
|
+++ smeserver-adv-samba-0.1.0/createlinks 2008-10-14 23:52:14.000000000 -0700 |
51 |
|
|
@@ -17,3 +17,6 @@ |
52 |
|
|
safe_symlink("../init.d/supervise/winbindd", "root/etc/rc.d/rc6.d/K35winbindd"); |
53 |
|
|
safe_symlink("../init.d/supervise/winbindd", "root/etc/rc.d/rc1.d/K35winbindd"); |
54 |
|
|
safe_symlink("../init.d/supervise/winbindd", "root/etc/rc.d/rc0.d/K35winbindd"); |
55 |
|
|
+ |
56 |
|
|
+# Symlink of winbindd status to workgroup-update event |
57 |
|
|
+safe_symlink("../actions/winbindd-service-status", "root/etc/e-smith/events/workgroup-update/S10winbindd-service-status"); |