diff options
author | Antoine Ginies <aginies@mandriva.com> | 2005-06-01 05:26:12 +0000 |
---|---|---|
committer | Antoine Ginies <aginies@mandriva.com> | 2005-06-01 05:26:12 +0000 |
commit | 67d143b34e6b29c86fb11faca991df4236db1098 (patch) | |
tree | 452c1bd7c654843790151cf0625ebd76e7ea5c2a | |
parent | 8d36b48a236fc910b0a0721e0f1fa309a801907b (diff) | |
download | drakwizard-67d143b34e6b29c86fb11faca991df4236db1098.tar drakwizard-67d143b34e6b29c86fb11faca991df4236db1098.tar.gz drakwizard-67d143b34e6b29c86fb11faca991df4236db1098.tar.bz2 drakwizard-67d143b34e6b29c86fb11faca991df4236db1098.tar.xz drakwizard-67d143b34e6b29c86fb11faca991df4236db1098.zip |
debug, debug, feature... many change...
-rwxr-xr-x | samba_wizard/Sambasharing.pm | 62 |
1 files changed, 37 insertions, 25 deletions
diff --git a/samba_wizard/Sambasharing.pm b/samba_wizard/Sambasharing.pm index dcd01bc2..8f3dc5f5 100755 --- a/samba_wizard/Sambasharing.pm +++ b/samba_wizard/Sambasharing.pm @@ -46,7 +46,7 @@ my $o = { wiz_home_writable => '', wiz_home_browseable => '', wiz_home_createmode => '', wiz_home_comment => '', wiz_share_comment => '', wiz_share_browseable => '', wiz_share_writable => '', - wiz_share_createmode => '', wiz_share_dotfiles => '', wiz_share_hidefiles => '', + wiz_share_create_mask => '', wiz_share_dotfiles => '', wiz_share_hidefiles => '', wiz_selected_share => '', wiz_selected_share_comment => '', wiz_understanding => '', @@ -247,7 +247,7 @@ $o->{pages} = { next => 'add_share_options', }, add_cdrom_share => { - name => N('Add a CDROM share'), + name => N('Share a CDROM'), pre => sub { if ($samba->{cdrom}{comment}) { $o->{var}{wiz_cdrom_comment} = $samba->{cdrom}{comment}; @@ -275,7 +275,7 @@ $o->{pages} = { next => 'summary_addcdromshare', }, add_share_options => { - name => N('Add a share') . "\n" . N('If you doesn\'t want to use one of this options, leave it blanck.'), + name => N('Add a share') . "\n" . N('If you don\'t want to use one of this options, leave it blanck.'), pre => sub { $o->{var}{wiz_addshare_createmode} = "0700"; $o->{var}{wiz_addshare_public} = "no"; @@ -328,7 +328,7 @@ $o->{pages} = { summary_modify => { name => N('Summary modify a share') . "\n\n" . N('If you really want to modify this share, click the Next button or use the Back button.'), data => [ - { label => N('Name of the share:'), fixed_val => \$o->{var}{wiz_share_name} }, + { label => N('Name of the share:'), fixed_val => \$o->{var}{wiz_selected_share} }, { label => N('Comment:'), fixed_val => \$o->{var}{wiz_share_comment} }, { label => N('Browseable:'), fixed_val => \$o->{var}{wiz_share_browseable} }, { label => N('Writable:'), fixed_val => \$o->{var}{wiz_share_writable} }, @@ -380,7 +380,7 @@ $o->{pages} = { next => 'end_delete_share', }, end => { - name => N('Congratulations') . "\n\n" . N('The wizard successfully configured your Samba server.'), + name => N('Congratulations') . "\n\n" . N('The wizard successfully configured your Samba samba.'), post => sub { store_samba_type($o->{var}{wiz_type}); }, @@ -462,7 +462,7 @@ sub write_conf_restart_smb { sub do_it_remove_share { $::testing and return; my $in = 'interactive'->vnew('su', 'Samba'); - my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server...")); + my $w = $in->wait_message(N("Samba share"), N("Configuring your Samba server...")); my $share = $o->{var}{wiz_selected_share}; delete $samba->{$share}; @@ -474,18 +474,30 @@ sub do_it_remove_share { sub do_it_modify_share { $::testing and return; my $in = 'interactive'->vnew('su', 'Samba'); - my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server...")); my $share = $o->{var}{wiz_selected_share}; + my $w = $in->wait_message(N("Samba share"), N("Configuring your Samba server...")); $samba->{$share}; $samba->{$share}{comment} = $o->{var}{wiz_share_comment}; - $samba->{$share}{browseable} = $o->{var}{wiz_share_browseable}; - $samba->{$share}{writable} = $o->{var}{wiz_share_writable}; - $samba->{$share}{public} = $o->{var}{wiz_share_public}; - $o->{var}{wiz_share_hidefiles} and $samba->{$share}{'hide files'} = $o->{var}{wiz_share_hidefiles}; - $o->{var}{wiz_share_dotfiles} and $samba->{$share}{'hide dot files'} = $o->{var}{wiz_share_dotfiles}; - $o->{var}{wiz_share_readlist} and $samba->{$share}{'read list'} = $o->{var}{wiz_share_readlist}; - $o->{var}{wiz_share_writelist} and $samba->{$share}{'write list'} = $o->{var}{wiz_share_writelist}; - $o->{var}{wiz_share_createmode} and $samba->{$share}{'create mode'} = $o->{var}{wiz_share_createmode}; + $samba->{$share}{path} = $o->{var}{wiz_share_path}; + $o->{var}{wiz_share_browseable} and $samba->{$share}{browseable} = $o->{var}{wiz_share_browseable}; + $o->{var}{wiz_share_writable} and $samba->{$share}{writable} = $o->{var}{wiz_share_writable}; + $o->{var}{wiz_share_public} and $samba->{$share}{public} = $o->{var}{wiz_share_public}; + # master level + if ($o->{var}{wiz_understanding} == 2) { + $o->{var}{wiz_share_readlist} and $samba->{$share}{'read list'} = $o->{var}{wiz_share_readlist}; + $o->{var}{wiz_share_writelist} and $samba->{$share}{'write list'} = $o->{var}{wiz_share_writelist}; + $o->{var}{wiz_share_dotfiles} and $samba->{$share}{'hide dot files'} = $o->{var}{wiz_share_dotfiles}; + $o->{var}{wiz_share_hidefiles} and $samba->{$share}{'hide files'} = $o->{var}{wiz_share_hidefiles}; + $o->{var}{wiz_share_valid_users} and $samba->{$share}{'valid users'} = $o->{var}{wiz_share_valid_users}; + $o->{var}{wiz_share_admin_users} and $samba->{$share}{'admin users'} = $o->{var}{wiz_share_admin_users}; + $o->{var}{wiz_share_preserve_case} and $samba->{$share}{'preserve case'} = $o->{var}{wiz_share_preserve_case}; + $o->{var}{wiz_share_short_preserve_case} and $samba->{$share}{'short preserve case'} = $o->{var}{wiz_share_short_preserve_case}; + $o->{var}{wiz_share_create_mask} and $samba->{$share}{'create mask'} = $o->{var}{wiz_share_create_mask}; + $o->{var}{wiz_share_force_create_mode} and $samba->{$share}{'force create mode'} = $o->{var}{wiz_share_force_create_mode}; + $o->{var}{wiz_share_force_directory_mode} and $samba->{$share}{'force directory mode'} = $o->{var}{wiz_share_force_directory_mode}; + $o->{var}{wiz_share_force_group} and $samba->{$share}{'force group'} = $o->{var}{wiz_share_force_group}; + $o->{var}{wiz_share_default_case} and $samba->{$share}{'default case'} = $o->{var}{wiz_share_default_case}; + } write_conf_restart_smb(); undef $w; @@ -495,7 +507,7 @@ sub do_it_modify_share { sub do_it_add_cdromshare { $::testing and return; my $in = 'interactive'->vnew('su', 'Samba'); - my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server...")); + my $w = $in->wait_message(N("Samba share"), N("Configuring your Samba server...")); $samba->{cdrom}{comment} = $o->{var}{wiz_cdrom_comment}; $samba->{cdrom}{path} = $o->{var}{wiz_cdrom_path}; $samba->{cdrom}{path} = $o->{var}{wiz_cdrom_path}; @@ -512,12 +524,12 @@ sub do_it_add_cdromshare { sub do_it_add_homeshare { $::testing and return; my $in = 'interactive'->vnew('su', 'Samba'); - my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server...")); + my $w = $in->wait_message(N("Samba share"), N("Configuring your Samba server...")); $samba->{homes}; $samba->{homes}{comment} = $o->{var}{wiz_home_comment}; - $samba->{homes}{browseable} = $o->{var}{wiz_home_browseable}; - $samba->{homes}{writable} = $o->{var}{wiz_home_writable}; - $samba->{homes}{'create mode'} = $o->{var}{wiz_home_createmode}; + $o->{var}{wiz_home_browseable} and $samba->{homes}{browseable} = $o->{var}{wiz_home_browseable}; + $o->{var}{wiz_home_writable} and $samba->{homes}{writable} = $o->{var}{wiz_home_writable}; + $o->{var}{wiz_home_createmode} and $samba->{homes}{'create mode'} = $o->{var}{wiz_home_createmode}; write_conf_restart_smb(); undef $w; @@ -528,20 +540,20 @@ sub do_it_add_homeshare { sub do_it_add_share { $::testing and return; my $in = 'interactive'->vnew('su', 'Samba'); - my $w = $in->wait_message(N("Samba server"), N("Configuring your Samba server...")); + my $w = $in->wait_message(N("Samba share"), N("Configuring your Samba server...")); my $share = $o->{var}{wiz_addshare_name}; $samba->{$share}; $samba->{$share}{comment} = $o->{var}{wiz_addshare_comment}; $samba->{$share}{path} = $o->{var}{wiz_addshare_path}; - $samba->{$share}{browseable} = $o->{var}{wiz_addshare_browseable}; - $samba->{$share}{writable} = $o->{var}{wiz_addshare_writable}; - $samba->{$share}{public} = $o->{var}{wiz_addshare_public}; + $o->{var}{wiz_addshare_browseable} and $samba->{$share}{browseable} = $o->{var}{wiz_addshare_browseable}; + $o->{var}{wiz_addshare_writable} and $samba->{$share}{writable} = $o->{var}{wiz_addshare_writable}; + $o->{var}{wiz_addshare_public} and $samba->{$share}{public} = $o->{var}{wiz_addshare_public}; $o->{var}{wiz_addshare_dotfiles} and $samba->{$share}{'hide dot files'} = $o->{var}{wiz_addshare_dotfiles}; $o->{var}{wiz_addshare_hidefiles} and $samba->{$share}{'hide files'} = $o->{var}{wiz_addshare_hidefiles}; $o->{var}{wiz_addshare_readlist} and $samba->{$share}{'read list'} = $o->{var}{wiz_addshare_readlist}; $o->{var}{wiz_addshare_writelist} and $samba->{$share}{'write list'} = $o->{var}{wiz_addshare_writelist}; - $o->{var}{wiz_addshare_createmode} and $samba->{$share}{'create mode'} = $o->{var}{wiz_addshare_createmode}; + $o->{var}{wiz_addshare_create_mask} and $samba->{$share}{'create mask'} = $o->{var}{wiz_addshare_create_mask}; write_conf_restart_smb(); undef $w; |