From 7e1daf4c42b0deeb294c46a4b46e72c0857d4718 Mon Sep 17 00:00:00 2001 From: damien Date: Fri, 29 Sep 2000 16:04:48 +0000 Subject: stc --- perl-install/ChangeLog | 10 ++++++++++ perl-install/any.pm | 1 + perl-install/common.pm | 13 ++++++++++++- perl-install/network.pm | 4 ++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog index 50929b6f1..1f3de2080 100644 --- a/perl-install/ChangeLog +++ b/perl-install/ChangeLog @@ -1,3 +1,13 @@ +2000-09-29 dam's + + * netconnect.pm (adsl_conf): dhcp should better work. + + * network.pm (configureNetwork): remove connection script if a + gateway is given. + + * common.pm (setVarsInShMode): created. chmod the file with + permissions passed in argument. + 2000-09-29 François Pons * modules.pm (load): fixed when standalone, use modprobe. diff --git a/perl-install/any.pm b/perl-install/any.pm index f6220f4bb..c92e2b581 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -406,6 +406,7 @@ END commands::mkdir_("-p", "$prefix/usr/share/config"); local *KPPPRC; open KPPPRC, ">$prefix/usr/share/config/kppprc" or die "Can't open $prefix/usr/share/config/kppprc: $!"; + chmod 0600, "$prefix/usr/share/config/kppprc"; print KPPPRC < [ qw(__ even odd arch better_arch compat_arch min max sqr sum and_ or_ sign product bool invbool listlength bool2text bool2yesno text2bool to_int to_float ikeys member divide is_empty_array_ref is_empty_hash_ref add2hash add2hash_ set_new set_add round round_up round_down first second top uniq translate untranslate warp_text formatAlaTeX formatLines deref next_val_in_array) ], functional => [ qw(fold_left compose mapgrep map_index grep_index find_index map_each grep_each list2kv map_tab_hash mapn mapn_ difference2 before_leaving catch_cdie cdie combine) ], file => [ qw(dirname basename touch all glob_ cat_ cat__ output symlinkf chop_ mode typeFromMagic expand_symlinks) ], - system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInCsh substInFile availableMemory availableRamMB removeXiBSuffix template2file template2userfile update_userkderc list_skels formatTime formatTimeRaw unix2dos setVirtual) ], + system => [ qw(sync makedev unmakedev psizeof strcpy gettimeofday syscall_ salt getVarsFromSh setVarsInSh setVarsInShMode setVarsInCsh substInFile availableMemory availableRamMB removeXiBSuffix template2file template2userfile update_userkderc list_skels formatTime formatTimeRaw unix2dos setVirtual) ], constant => [ qw($printable_chars $sizeof_int $bitof_int $SECTORSIZE %compat_arch) ], ); @EXPORT_OK = map { @$_ } values %EXPORT_TAGS; @@ -435,6 +435,17 @@ sub setVarsInSh { open F, "> $_[0]" or die "cannot create config file $file"; $l->{$_} and print F "$_=$l->{$_}\n" foreach @fields; } + +sub setVarsInShMode { + my ($file, $mod, $l, @fields) = @_; + @fields = keys %$l unless @fields; + + local *F; + open F, "> $_[0]" or die "cannot create config file $file"; + chmod $mod, $file; + $l->{$_} and print F "$_=$l->{$_}\n" foreach @fields; +} + sub setVarsInCsh { my ($file, $l, @fields) = @_; @fields = keys %$l unless @fields; diff --git a/perl-install/network.pm b/perl-install/network.pm index b91c66cdd..28537b9bb 100644 --- a/perl-install/network.pm +++ b/perl-install/network.pm @@ -277,6 +277,10 @@ such as ``mybox.mylab.myco.com''."), $netc->{HOSTNAME} ne $dhcp_hostname and $netc->{DHCP_HOSTNAME} = $netc->{HOSTNAME}; } else { configureNetworkNet($in, $netc, $last ||= {}, @l); + if ( $netc->{GATEWAY} ) { + unlink "$prefix/etc/sysconfig/network-scripts/net_cnx_up"; + unlink "$prefix/etc/sysconfig/network-scripts/net_cnx_down"; + } } miscellaneousNetwork($in); } -- cgit v1.2.1