summaryrefslogtreecommitdiffstats
path: root/pki/base/setup
diff options
context:
space:
mode:
authorjdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-19 20:58:33 +0000
committerjdennis <jdennis@c9f7a03b-bd48-0410-a16d-cbbf54688b0b>2010-11-19 20:58:33 +0000
commit53f8574493e361d4c1596f1d174a3aa2a5755fe9 (patch)
tree1ae6423e5046de562c84be63b9aaa360597bf748 /pki/base/setup
parent9df3c15d529c9b0e278f2b912030abb6449f77ba (diff)
downloadpki-53f8574493e361d4c1596f1d174a3aa2a5755fe9.tar.gz
pki-53f8574493e361d4c1596f1d174a3aa2a5755fe9.tar.xz
pki-53f8574493e361d4c1596f1d174a3aa2a5755fe9.zip
Fix initialization of $uninstall_action
In some places $uninstall_action was being referenced before it was initialized and thus generated warnings. git-svn-id: svn+ssh://svn.fedorahosted.org/svn/pki/trunk@1566 c9f7a03b-bd48-0410-a16d-cbbf54688b0b
Diffstat (limited to 'pki/base/setup')
-rwxr-xr-xpki/base/setup/pkicommon15
1 files changed, 10 insertions, 5 deletions
diff --git a/pki/base/setup/pkicommon b/pki/base/setup/pkicommon
index f719a9140..1acaf12ce 100755
--- a/pki/base/setup/pkicommon
+++ b/pki/base/setup/pkicommon
@@ -2112,12 +2112,13 @@ sub create_empty_file
{
my ($path, $permissions, $owner, $group, $uninstall_action) = @_;
+ $uninstall_action = 'remove' unless defined($uninstall_action);
+
emit(sprintf("create_empty_file(%s, %s, %s, %s, %s)\n",
$path,
defined($permissions) ? sprintf("%o", $permissions) : "",
$owner, $group, $uninstall_action), "debug");
- $uninstall_action = 'remove' unless defined($uninstall_action);
add_install_info($path, 'file', $uninstall_action);
if (!$dry_run) {
@@ -2145,12 +2146,13 @@ sub create_file
{
my ($path, $contents, $permissions, $owner, $group, $uninstall_action) = @_;
+ $uninstall_action = 'remove' unless defined($uninstall_action);
+
emit(sprintf("create_file(%s, %s, %s, %s, %s)\n",
$path,
defined($permissions) ? sprintf("%o", $permissions) : "",
$owner, $group, $uninstall_action), "debug");
- $uninstall_action = 'remove' unless defined($uninstall_action);
add_install_info($path, 'file', $uninstall_action);
if (!$dry_run) {
@@ -2179,12 +2181,13 @@ sub copy_file
{
my ($src_path, $dst_path, $permissions, $owner, $group, $uninstall_action) = @_;
+ $uninstall_action = 'remove' unless defined($uninstall_action);
+
emit(sprintf("copy_file(%s, %s, %s, %s, %s, %s)\n",
$src_path, $dst_path,
defined($permissions) ? sprintf("%o", $permissions) : "",
$owner, $group, $uninstall_action), "debug");
- $uninstall_action = 'remove' unless defined($uninstall_action);
add_install_info($dst_path, 'file', $uninstall_action);
if (!is_path_valid($src_path)) {
@@ -2660,12 +2663,13 @@ sub create_directory
my $result = 1;
my $errors;
+ $uninstall_action = 'remove' unless defined($uninstall_action);
+
emit(sprintf("create_directory(%s, %s, %s, %s, %s)\n",
$dir,
defined($permissions) ? sprintf("%o", $permissions) : "",
$owner, $group, $uninstall_action), "debug");
- $uninstall_action = 'remove' unless defined($uninstall_action);
add_install_info($dir, 'dir', $uninstall_action);
return 1 if $dry_run;
@@ -2906,9 +2910,10 @@ sub create_symlink
{
my ($symlink, $dst_path, $owner, $group, $uninstall_action) = @_;
+ $uninstall_action = 'remove' unless defined($uninstall_action);
+
emit(sprintf("create_symlink(%s)\n", join(", ", @_)), "debug");
- $uninstall_action = 'remove' unless defined($uninstall_action);
add_install_info($symlink, 'symlink', $uninstall_action);
return 1 if $dry_run;