8027
|
1 |
diff -u system-tools-backends-1.4.2/file.pl.in-orig system-tools-backends-1.4.2/file.pl.in
|
8121
|
2 |
--- system-tools-backends-1.4.2/file.pl.in-orig 2005-11-04 15:49:36.000000000 +0000
|
|
3 |
+++ system-tools-backends-1.4.2/file.pl.in 2006-09-04 15:33:27.883226000 +0100
|
|
4 |
@@ -50,6 +50,10 @@
|
8027
|
5 |
sub gst_file_get_base_path
|
|
6 |
{
|
|
7 |
my $path = "/var/cache/setup-tool-backends";
|
8121
|
8 |
+ # Need to check using @build_os@ configure substution incase platform is not
|
|
9 |
+ # yet determined.
|
8027
|
10 |
+ $path = "/var/spool/setup-tool-backends" if ($$tool{"platform"} =~ /solaris-.*/ || "@build_os@" =~ /solaris.*/);
|
|
11 |
+ &gst_file_create_path($path) unless ( -d $path );
|
|
12 |
chmod (0755, $path);
|
|
13 |
return $path;
|
|
14 |
}
|
8121
|
15 |
@@ -57,18 +61,33 @@
|
8027
|
16 |
|
|
17 |
sub gst_file_get_tmp_path
|
|
18 |
{
|
8121
|
19 |
+ # Need to check using @build_os@ configure substution incase platform is not
|
|
20 |
+ # yet determined.
|
|
21 |
+ if ($$tool{"platform"} =~ /solaris-.*/ || "@build_os@" =~ /solaris.*/) {
|
8027
|
22 |
+ my $path = "/var/run/setup-tool-backends/tmp";
|
8121
|
23 |
+ &gst_file_create_path($path, 0700) unless ( -d $path );
|
8027
|
24 |
+ chmod (0700, $path);
|
|
25 |
+ return ($path);
|
|
26 |
+ }
|
|
27 |
return (&gst_file_get_base_path () . "/tmp");
|
|
28 |
}
|
|
29 |
|
8121
|
30 |
-
|
|
31 |
sub gst_file_get_backup_path
|
|
32 |
{
|
|
33 |
return (&gst_file_get_base_path () . "/backup");
|
|
34 |
}
|
8027
|
35 |
|
8121
|
36 |
-
|
8027
|
37 |
sub gst_file_get_debug_path
|
|
38 |
{
|
8121
|
39 |
+ # Need to check using @build_os@ configure substution incase platform is not
|
|
40 |
+ # yet determined.
|
|
41 |
+ if ($$tool{"platform"} =~ /solaris-.*/ || "@build_os@" =~ /solaris.*/) {
|
8027
|
42 |
+ my $path = "/var/run/setup-tool-backends/debug";
|
8121
|
43 |
+ &gst_file_create_path($path, 0700) unless ( -d $path );
|
|
44 |
+
|
8027
|
45 |
+ chmod (0700, $path);
|
|
46 |
+ return ($path);
|
|
47 |
+ }
|
|
48 |
return (&gst_file_get_base_path (). "/debug");
|
|
49 |
}
|
|
50 |
|
8121
|
51 |
@@ -76,6 +95,7 @@
|
8027
|
52 |
sub gst_file_get_data_path
|
|
53 |
{
|
|
54 |
my $path = &gst_file_get_base_path (). "/data";
|
|
55 |
+ &gst_file_create_path($path) unless ( -d $path );
|
|
56 |
chmod (0755, $path);
|
|
57 |
return $path;
|
|
58 |
}
|
8121
|
59 |
@@ -105,7 +125,7 @@
|
|
60 |
my ($cmd) = @_;
|
|
61 |
|
|
62 |
my $command = &get_cmd_path ($cmd);
|
|
63 |
- return ("LC_ALL=C PATH=\$PATH:/sbin:/usr/sbin $command 2> /dev/null");
|
|
64 |
+ return ("LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/sbin:\$PATH $command 2> /dev/null");
|
|
65 |
}
|
|
66 |
|
|
67 |
# necessary for some programs that output info through stderr
|
|
68 |
@@ -114,7 +134,7 @@
|
|
69 |
my ($cmd) = @_;
|
|
70 |
|
|
71 |
my $command = &get_cmd_path ($cmd);
|
|
72 |
- return ("LC_ALL=C PATH=\$PATH:/sbin:/usr/sbin $command 2>&1");
|
|
73 |
+ return ("LC_ALL=C PATH=/sbin:/usr/sbin:/bin:/usr/sbin:\$PATH $command 2>&1");
|
|
74 |
}
|
|
75 |
|
|
76 |
|
|
77 |
@@ -772,6 +792,14 @@
|
7860
|
78 |
}
|
|
79 |
}
|
|
80 |
|
|
81 |
+sub gst_file_read_joined_lines
|
|
82 |
+{
|
|
83 |
+ my ($file) = @_;
|
|
84 |
+ my $buffer = &gst_file_buffer_load ($file);
|
|
85 |
+ &gst_file_buffer_join_lines ($buffer);
|
|
86 |
+ $$buffer[0] =~ s/\n//; $$buffer[0] =~ s/\\//;
|
|
87 |
+ return $$buffer[0];
|
|
88 |
+}
|
|
89 |
|
|
90 |
# --- Command-line utilities --- #
|
|
91 |
|
8027
|
92 |
|
7860
|
93 |
diff -ru /var/tmp/clean/system-tools-backends-1.4.2/partition.pl.in system-tools-backends-1.4.2/partition.pl.in
|
|
94 |
--- /var/tmp/clean/system-tools-backends-1.4.2/partition.pl.in 2004-11-05 17:03:26.000000000 +0000
|
|
95 |
+++ system-tools-backends-1.4.2/partition.pl.in 2006-03-13 10:14:56.152216000 +0000
|
|
96 |
@@ -86,6 +86,17 @@
|
|
97 |
},
|
|
98 |
);
|
|
99 |
|
|
100 |
+sub gst_partition_scan_sunos_info
|
|
101 |
+{
|
|
102 |
+ my ($fd, $line);
|
|
103 |
+ my (%hash);
|
|
104 |
+ my (@table);
|
|
105 |
+
|
|
106 |
+ $hash{"partition"} = \@table;
|
|
107 |
+
|
|
108 |
+ return \%hash;
|
|
109 |
+}
|
|
110 |
+
|
|
111 |
sub gst_partition_scan_freebsd_info
|
|
112 |
{
|
|
113 |
my ($fd, $line);
|
|
114 |
@@ -192,6 +203,7 @@
|
|
115 |
|
|
116 |
return &gst_partition_scan_linux_info if ($plat eq "Linux");
|
|
117 |
return &gst_partition_scan_freebsd_info if ($plat eq "FreeBSD");
|
|
118 |
+ return &gst_partition_scan_sunos_info if ($plat eq "SunOS");
|
|
119 |
}
|
|
120 |
|
|
121 |
%GST_FILESYS_TYPES =
|
|
122 |
diff -ru /var/tmp/clean/system-tools-backends-1.4.2/platform.pl.in system-tools-backends-1.4.2/platform.pl.in
|
|
123 |
--- /var/tmp/clean/system-tools-backends-1.4.2/platform.pl.in 2006-01-02 15:32:34.000000000 +0000
|
|
124 |
+++ system-tools-backends-1.4.2/platform.pl.in 2006-03-13 10:14:56.152576000 +0000
|
|
125 |
@@ -38,6 +38,8 @@
|
|
126 |
|
|
127 |
|
|
128 |
$PLATFORM_INFO = {
|
|
129 |
+ "solaris-2.11" => "Solaris Nevada / Open Solaris",
|
|
130 |
+ "nexenta-1.0" => "Nexenta GNU/Solaris 1.0 Ellate",
|
|
131 |
"debian-2.2" => "Debian GNU/Linux 2.2 Potato",
|
|
132 |
"debian-3.0" => "Debian GNU/Linux 3.0 Woody",
|
|
133 |
"debian-sarge" => "Debian GNU/Linux Sarge",
|
|
134 |
@@ -110,7 +112,8 @@
|
|
135 |
("Debian" => "debian"),
|
|
136 |
("Mandrake" => "mandrake"),
|
|
137 |
("Conectiva" => "conectiva"),
|
|
138 |
- ("Blackpanther" => "blackpanther");
|
|
139 |
+ ("Blackpanther" => "blackpanther"),
|
|
140 |
+ ("gnu_solaris" => "nexenta");
|
|
141 |
|
|
142 |
# gst_prefix not required here: parse already does that for us.
|
|
143 |
$dist = lc (&gst_parse_sh ("/etc/lsb-release", "DISTRIB_ID"));
|
|
144 |
@@ -528,9 +531,11 @@
|
|
145 |
chomp ($dist = <$fd>);
|
|
146 |
&gst_file_close ($fd);
|
|
147 |
|
|
148 |
- if ($dist =~ /^5\.(\d)/) { return "solaris-2.$1" }
|
|
149 |
- else { if ($dist =~ /^([78])\.\d/) { return "solaris-$1.0" } }
|
|
150 |
- return -1;
|
|
151 |
+ if (-f "$gst_prefix/etc/debian_version") { return check_lsb() }
|
|
152 |
+ else {
|
|
153 |
+ if ($dist =~ /^5\.(\d+)/) { return "solaris-2.$1" }
|
|
154 |
+ else { return -1 }
|
|
155 |
+ }
|
|
156 |
}
|
|
157 |
|
|
158 |
sub gst_platform_get_system
|
|
159 |
diff -ru /usr/tmp/clean/system-tools-backends-1.4.2/debug.pl.in system-tools-backends-1.4.2/debug.pl.in
|
|
160 |
--- /usr/tmp/clean/system-tools-backends-1.4.2/debug.pl.in Sun Sep 14 22:51:49 2003
|
|
161 |
+++ system-tools-backends-1.4.2/debug.pl.in Mon Apr 10 16:04:52 2006
|
|
162 |
@@ -83,7 +83,14 @@
|
|
163 |
@buff = split ("\n", $doc);
|
|
164 |
foreach $line (@buff)
|
|
165 |
{
|
|
166 |
- print $fd "$line\n";
|
|
167 |
+ if ($line =~ /<password>/)
|
|
168 |
+ {
|
|
169 |
+ print $fd "# suppress line containing password\n";
|
|
170 |
+ }
|
|
171 |
+ else
|
|
172 |
+ {
|
|
173 |
+ print $fd "$line\n";
|
|
174 |
+ }
|
|
175 |
}
|
|
176 |
}
|
|
177 |
|
8121
|
178 |
diff -u system-tools-backends-1.4.2/xml.pl.in-orig system-tools-backends-1.4.2/xml.pl.in
|
|
179 |
--- system-tools-backends-1.4.2/xml.pl.in-orig 2005-06-28 18:47:27.000000000 +0100
|
|
180 |
+++ system-tools-backends-1.4.2/xml.pl.in 2006-09-06 10:10:25.634899000 +0100
|
|
181 |
@@ -542,7 +542,7 @@
|
|
182 |
}
|
|
183 |
elsif ($file)
|
|
184 |
{
|
|
185 |
- $doc = $file;
|
|
186 |
+ $doc = $file; # XXX - This results in the filename being output to in.xml, why would we want this?
|
|
187 |
}
|
|
188 |
else
|
|
189 |
{
|
|
190 |
|