summaryrefslogtreecommitdiffstats
path: root/samba_wizard/scripts
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2003-03-02 14:12:24 +0000
committerFlorent Villard <warly@mandriva.com>2003-03-02 14:12:24 +0000
commit0c24f86ef88df61f17770a60376ab934101e6677 (patch)
treecd9dd64147084c7b7148f5a698bc7627c005382b /samba_wizard/scripts
parent7eceb2bda4b5f28213df8611be6516f2c397835f (diff)
downloaddrakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.gz
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.bz2
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.tar.xz
drakwizard-0c24f86ef88df61f17770a60376ab934101e6677.zip
use services.pm to restart smb in samba wizard
Diffstat (limited to 'samba_wizard/scripts')
-rwxr-xr-xsamba_wizard/scripts/Smbconf.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/samba_wizard/scripts/Smbconf.pm b/samba_wizard/scripts/Smbconf.pm
index b44c61e9..253b9c0c 100755
--- a/samba_wizard/scripts/Smbconf.pm
+++ b/samba_wizard/scripts/Smbconf.pm
@@ -19,10 +19,12 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package Smbconf;
+use lib '/usr/lib/libDrakX';
require "__WIZ_HOME__/common/scripts/Vareqval.pm";
require "__WIZ_HOME__/common/scripts/IFCFG.pm";
use MDK::Common;
use strict;
+use services;
use Data::Dumper;
# All possibilies in the config file must be precedeed by ";"
@@ -327,7 +329,11 @@ sub do_it {
$conf->comment_menu("printers", ";");
}
$conf->write_conf("/etc/samba/smb.conf");
- system("/etc/rc.d/init.d/smb restart");
+ if (services::is_service_running('smb')) {
+ services::restart('smb')
+ } else {
+ services::start('smb')
+ }
10;
}
1;