Skip to content

Commit

Permalink
aii-ks: Drop the rereadpt function
Browse files Browse the repository at this point in the history
ncm-lib-blockdevices does not use it anymore.
  • Loading branch information
gombasg authored and jrha committed Jun 8, 2021
1 parent e8336e7 commit 9581c1c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 32 deletions.
19 changes: 2 additions & 17 deletions aii-ks/src/main/perl/ks.pm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#${PMpre} NCM::Component::ks${PMpost}

use EDG::WP4::CCM::Path qw (escape unescape);
use NCM::Filesystem 18.12.0;
use NCM::Filesystem 19.12.1;
use NCM::Partition qw (partition_sort);
use NCM::BlockdevFactory 18.12.0 qw (build);
use NCM::BlockdevFactory 19.12.1 qw (build);

use LC::Exception qw (throw_error);
use CAF::FileWriter;
Expand Down Expand Up @@ -805,21 +805,6 @@ EOF

print <<'EOF';
# Hack for RHEL 6: force re-reading the partition table
#
# fdisk often fails to re-read the partition table on RHEL 6, so we have to do
# it explicitely. We also have to make sure that udev had enough time to create
# the device nodes.
rereadpt () {
[ -x /sbin/udevadm ] && udevadm settle
# hdparm can still fail with EBUSY without the wait...
sleep 2
hdparm -q -z "$1"
[ -x /sbin/udevadm ] && udevadm settle
# Just in case...
sleep 2
}
disksize_MiB () {
local path BYTES MB RET
RET=0
Expand Down
15 changes: 0 additions & 15 deletions aii-ks/src/test/resources/regexps/pre_noblock_functions
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,6 @@ Test the functions in the pre section
^set -x$
^$
^$
^\# Hack for RHEL 6: force re-reading the partition table$
^\#$
^\# fdisk often fails to re-read the partition table on RHEL 6, so we have to do$
^\# it explicitely. We also have to make sure that udev had enough time to create$
^\# the device nodes.$
^rereadpt \(\) \{$
^\s{4}\[ -x /sbin/udevadm \] && udevadm settle$
^\s{4}\# hdparm can still fail with EBUSY without the wait...$
^\s{4}sleep 2$
^\s{4}hdparm -q -z "\$1"$
^\s{4}\[ -x /sbin/udevadm \] && udevadm settle$
^\s{4}\# Just in case...$
^\s{4}sleep 2$
^\}$
^$
^disksize_MiB \(\) \{$
^\s{4}local path BYTES MB RET$
^\s{4}RET=0$
Expand Down

0 comments on commit 9581c1c

Please sign in to comment.