Skip to content

Commit

Permalink
Merge pull request #1715 from stdweird/use_var_tmp_aii
Browse files Browse the repository at this point in the history
/var/tmp is supposed to be reboot persistent
  • Loading branch information
jrha authored Sep 17, 2024
2 parents ecf8f9c + c9cef33 commit 3482ac9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ncm-freeipa/src/main/perl/freeipa.pm
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ sub _manual_initialisation
my @yum;
if (@cli_packages) {
push(@yum, qw(yum -y install), @cli_packages);
push(@yum, qw(-c /tmp/aii/yum/yum.conf)) if $opts{aii};
push(@yum, qw(-c /var/tmp/aii/yum/yum.conf)) if $opts{aii};

}

Expand Down
2 changes: 1 addition & 1 deletion ncm-freeipa/src/test/perl/aii-basic.t
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ok(POST_history_ok([
]), "host_add / host_mod called");


like($fh, qr(^yum -y install ncm-freeipa-\d+\.\d+\.\d+-\w+ nss-pam-ldapd ipa-client nss-tools openssl pam_krb5 -c /tmp/aii/yum/yum.conf$)m,
like($fh, qr(^yum -y install ncm-freeipa-\d+\.\d+\.\d+-\w+ nss-pam-ldapd ipa-client nss-tools openssl pam_krb5 -c /var/tmp/aii/yum/yum.conf$)m,
"install freeipa component and CLI dependencies in post_reboot");
like($fh, qr(^PERL5LIB=/usr/lib/perl perl -MNCM::Component::FreeIPA::CLI -w -e install -- --realm MY.REALM --primary myhost.example.com --domain com --fqdn myhost.example.com --hostcert 1 --otp 'superse\\\$cret\\\$OTP'$)m,
"CLI called as expected");
Expand Down
2 changes: 1 addition & 1 deletion ncm-opennebula/src/main/perl/OpenNebula/AII.pm
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ sub aii_post_reboot
my $tree = $config->getElement($path)->getTree();

print <<EOF;
yum -c /tmp/aii/yum/yum.conf -y install acpid
yum -c /var/tmp/aii/yum/yum.conf -y install acpid
service acpid start
EOF
}
Expand Down
2 changes: 1 addition & 1 deletion ncm-opennebula/src/test/perl/aii_kickstart.t
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ my $path;
$path = "/system/aii/hooks/install/0";
$aii->aii_post_reboot($cfg, $path);

like($fh, qr{^yum\s-c\s/tmp/aii/yum/yum.conf\s-y\sinstall\sacpid}m, 'yum install acpid present');
like($fh, qr{^yum\s-c\s/var/tmp/aii/yum/yum.conf\s-y\sinstall\sacpid}m, 'yum install acpid present');
like($fh, qr{^service\sacpid\sstart}m, 'service acpid restart present');

# close the selected FH and reset STDOUT
Expand Down

0 comments on commit 3482ac9

Please sign in to comment.