Subversion Repositories camp_sysinfo_client_3

Rev

Rev 218 | Rev 224 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 218 Rev 223
Line 124... Line 124...
124
 
124
 
125
# list of libraries used by the system. We will offer to install them if
125
# list of libraries used by the system. We will offer to install them if
126
# we know how. NOTE: I have chosen to put the full installation command
126
# we know how. NOTE: I have chosen to put the full installation command
127
# for each library. This allows us to use the package selector OR a different
127
# for each library. This allows us to use the package selector OR a different
128
# piece of code on a per-library basis, but results in something like
128
# piece of code on a per-library basis, but results in something like
129
#      apt-get -y install perl-modules
129
#      apt -y install perl-modules
130
#      apt-get -y install libwww-perl
130
#      apt -y install libwww-perl
131
# instead of
131
# instead of
132
#      apt-get -y install libwww-perl perl-modules
132
#      apt -y install libwww-perl perl-modules
133
# flexibility vs efficiency in this case.
133
# flexibility vs efficiency in this case.
134
our %libraries = ( 
134
our %libraries = ( 
135
                  'File::Basename' => {
135
                  'File::Basename' => {
136
                     'debian' => {
136
                     'debian' => {
137
                        'command'   => 'apt-get -y install',
137
                        'command'   => 'apt -y install',
138
                        'parameter' => 'perl-modules'
138
                        'parameter' => 'perl-modules'
139
                     }
139
                     }
140
                  },
140
                  },
141
                  'Exporter' => {
141
                  'Exporter' => {
142
                     'debian' => {
142
                     'debian' => {
143
                        'comand' => 'apt-get -y install',
143
                        'comand' => 'apt -y install',
144
                        'parameter' => 'perl-base'
144
                        'parameter' => 'perl-base'
145
                     },
145
                     },
146
                  },
146
                  },
147
                  'LWP' => { 
147
                  'LWP' => { 
148
                     'debian' => {
148
                     'debian' => {
149
                        'command'   => 'apt-get -y install',
149
                        'command'   => 'apt -y install',
150
                        'parameter' => 'libwww-perl'
150
                        'parameter' => 'libwww-perl'
151
                     },
151
                     },
152
                     'freebsd' => {
152
                     'freebsd' => {
153
                        'command'   => 'echo y | pkg install',
153
                        'command'   => 'echo y | pkg install',
154
                        'parameter' => 'p5-libwww'
154
                        'parameter' => 'p5-libwww'
Line 158... Line 158...
158
                        'parameter' => 'LWP'
158
                        'parameter' => 'LWP'
159
                     }
159
                     }
160
                  },
160
                  },
161
                  'Hash::Merge' => {
161
                  'Hash::Merge' => {
162
                     'debian' => {
162
                     'debian' => {
163
                        'command'   => 'apt-get -y install',
163
                        'command'   => 'apt -y install',
164
                        'parameter' => 'libhash-merge-perl',
164
                        'parameter' => 'libhash-merge-perl',
165
                     },
165
                     },
166
                     'freebsd' => {
166
                     'freebsd' => {
167
                        'command' => 'cpan -i',
167
                        'command' => 'cpan -i',
168
                        'parameter' => 'Hash::Merge'
168
                        'parameter' => 'Hash::Merge'
Line 176... Line 176...
176
                        'parameter' => 'Hash::Merge'
176
                        'parameter' => 'Hash::Merge'
177
                     }
177
                     }
178
                  },
178
                  },
179
                  'YAML::Tiny' => {
179
                  'YAML::Tiny' => {
180
                     'debian' => {
180
                     'debian' => {
181
                        'command'   => 'apt-get -y install',
181
                        'command'   => 'apt -y install',
182
                        'parameter' => 'libyaml-tiny-perl',
182
                        'parameter' => 'libyaml-tiny-perl',
183
                     },
183
                     },
184
                     'freebsd' => {
184
                     'freebsd' => {
185
                        'command' => 'echo y | pkg install',
185
                        'command' => 'echo y | pkg install',
186
                        'parameter' => 'p5-YAML-Tiny'
186
                        'parameter' => 'p5-YAML-Tiny'
Line 194... Line 194...
194
                        'parameter' => 'YAML::Tiny'
194
                        'parameter' => 'YAML::Tiny'
195
                     }
195
                     }
196
                  },
196
                  },
197
                  'Sys::Syslog' => {
197
                  'Sys::Syslog' => {
198
                     'debian' => {
198
                     'debian' => {
199
                        'command' => 'apt-get -y install',
199
                        'command' => 'apt -y install',
200
                        'parameter' => 'libsys-syslog-perl',
200
                        'parameter' => 'libsys-syslog-perl',
201
                     },
201
                     },
202
                     'freebsd' => {
202
                     'freebsd' => {
203
                        'command' => 'echo y | pkg install',
203
                        'command' => 'echo y | pkg install',
204
                        'parameter' => 'p5-Unix-Syslog',
204
                        'parameter' => 'p5-Unix-Syslog',
Line 208... Line 208...
208
                        'parameter' => 'Unix::Syslog'
208
                        'parameter' => 'Unix::Syslog'
209
                     }
209
                     }
210
                  },
210
                  },
211
                  'JSON' => {
211
                  'JSON' => {
212
                     'debian' => {
212
                     'debian' => {
213
                        'command' => 'apt-get -y install',
213
                        'command' => 'apt -y install',
214
                        'parameter' => 'libjson-perl'
214
                        'parameter' => 'libjson-perl'
215
                     },
215
                     },
216
                     'freebsd' => {
216
                     'freebsd' => {
217
                        'command' => 'echo y | pkg install',
217
                        'command' => 'echo y | pkg install',
218
                        'parameter' => 'p5-JSON'
218
                        'parameter' => 'p5-JSON'
Line 225... Line 225...
225
                );
225
                );
226
 
226
 
227
our %binaries = (
227
our %binaries = (
228
                  'dmidecode' => {
228
                  'dmidecode' => {
229
                     'debian' => {
229
                     'debian' => {
230
                        'command' => 'apt-get -y install',
230
                        'command' => 'apt -y install',
231
                        'parameter' => 'dmidecode'
231
                        'parameter' => 'dmidecode'
232
                     },
232
                     },
233
                     'freebsd' => {
233
                     'freebsd' => {
234
                        'command' => 'echo y | pkg install',
234
                        'command' => 'echo y | pkg install',
235
                        'parameter' => 'dmidecode'
235
                        'parameter' => 'dmidecode'