summaryrefslogtreecommitdiff
path: root/install.pl.in
diff options
context:
space:
mode:
authorfukachan <fukachan>2003-01-30 03:33:16 +0000
committerfukachan <fukachan>2003-01-30 03:33:16 +0000
commit98ba2598f31d5ae7377941f21fbbbe68b34c5152 (patch)
tree1473e25a9daf93f0e2e8f6ad54016673209f3090 /install.pl.in
parent6e22c93b1b43ec8759400aaa9725242ea970f57e (diff)
downloadfml8-98ba2598f31d5ae7377941f21fbbbe68b34c5152.tar.gz
fml8-98ba2598f31d5ae7377941f21fbbbe68b34c5152.tar.bz2
fml8-98ba2598f31d5ae7377941f21fbbbe68b34c5152.zip
change check rule order.
1. check owner and group 2. check if it runs as user root, start installation.
Diffstat (limited to 'install.pl.in')
-rwxr-xr-xinstall.pl.in27
1 files changed, 14 insertions, 13 deletions
diff --git a/install.pl.in b/install.pl.in
index eb30fc57..fa8c7cb7 100755
--- a/install.pl.in
+++ b/install.pl.in
@@ -5,7 +5,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: install.pl.in,v 1.2 2003/01/29 13:58:10 fukachan Exp $
+# $FML: install.pl.in,v 1.3 2003/01/29 14:22:53 fukachan Exp $
#
use strict;
@@ -49,22 +49,23 @@ sub _install
printf $format, "version", $installer->get_version() if $debug;
- my $list = $config->get_as_array_ref('mandatory_dirs');
- for my $dir (@$list) {
- my $path = $installer->path($dir);
- printf $format, $dir, $path if $debug;
- unless (-d $path) {
- $installer->mkdir($path);
- }
- else {
- print STDERR "ok $path\n" if $debug;
- }
- }
-
$installer->is_valid_owner( $config->{ owner } );
$installer->is_valid_group( $config->{ group } );
if ($installer->is_run_as_root()) {
+
+ my $list = $config->get_as_array_ref('mandatory_dirs');
+ for my $dir (@$list) {
+ my $path = $installer->path($dir);
+ printf $format, $dir, $path if $debug;
+ unless (-d $path) {
+ $installer->mkdir($path);
+ }
+ else {
+ print STDERR "ok $path\n" if $debug;
+ }
+ }
+
$installer->install_main_cf();
$installer->install_sample_cf_files();
$installer->install_default_config_files();