From f9879d831ea0efbacd00a85fe659e0b108cf7de6 Mon Sep 17 00:00:00 2001 From: freesource Date: Fri, 24 Aug 2001 02:48:47 +0000 Subject: [PATCH] Improves some text, and adds a correction to the alternatives generation. --- yard/scripts/make_debian | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/yard/scripts/make_debian b/yard/scripts/make_debian index 590b9c3..2c63659 100755 --- a/yard/scripts/make_debian +++ b/yard/scripts/make_debian @@ -198,7 +198,7 @@ my $stuff = << "STUFF"; /etc/resolv.conf /etc/hosts <= Replacements/etc/hosts /root/umlnet <= Replacements/root/umlnet # Example network setup script -/etc/network <= Replacements/etc/network +/etc/networks <= Replacements/etc/networks /etc/network/if-down.d # empty /etc/network/if-post-down.d # "" /etc/network/if-pre-up.d # "" @@ -340,9 +340,14 @@ print DEBIAN status_info_divert(); print DEBIAN "\n# Alternative stuff.\n"; foreach (@alternatives) { if ($alternatives{$_}) { - print DEBIAN "/etc/alternatives/", $alternatives{$_}, "\n"; - print DEBIAN "/var/lib/dpkg/alternatives/", $alternatives{$_}, "\n"; - print DEBIAN dirname($_), "/", $alternatives{$_}, "\n"; + foreach my $alt ( 0 .. $#{ $alternatives{$_} } ) { + print DEBIAN "/etc/alternatives/", + $alternatives{$_}[$alt], "\n"; + print DEBIAN "/var/lib/dpkg/alternatives/", + $alternatives{$_}[$alt], "\n"; + print DEBIAN dirname($_), "/", + $alternatives{$_}[$alt], "\n"; + } } } @@ -491,7 +496,12 @@ sub alternatives { my($left,$right) = split(" -> "); chomp $right; $left =~ s/^.*\d+\s//g; - $alternatives{$right} = $left; + if (!$alternatives{$right}) { + $alternatives{$right} = [$left]; + } + else { + push @{ $alternatives {$right} }, $left; + } } } close(LS);