xfs_check to check the filesystem. As of August 2021,
xfs_repair finds all filesystem corruptions found by xfs_check,
and more, which means that xfs_check is no longer run by default.
+ - Set KCONFIG_PATH to specify your preferred location of kernel
+ config file.
- or add a case to the switch in common/config assigning
these variables based on the hostname of your test
export ACCTON_PROG="$(type -P accton)"
export E2IMAGE_PROG="$(type -P e2image)"
export BLKZONE_PROG="$(type -P blkzone)"
+export GZIP_PROG="$(type -P gzip)"
# use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
# newer systems have udevadm command but older systems like RHEL5 don't.
esac
}
+_has_kernel_config()
+{
+ local option=$1
+ local uname=$(uname -r)
+ local config_list="$KCONFIG_PATH
+ /proc/config.gz
+ /lib/modules/$uname/build/.config
+ /boot/config-$uname
+ /lib/kernel/config-$uname"
+
+ for config in $config_list; do
+ [ ! -f $config ] && continue
+ [ $config = "/proc/config.gz" ] && break
+ grep -qE "^${option}=[my]" $config
+ return
+ done
+
+ [ ! -f $config ] && _notrun "Could not locate kernel config file"
+
+ # We can only get here with /proc/config.gz
+ _require_command "$GZIP_PROG" gzip
+ $GZIP_PROG -cd $config | grep -qE "^${option}=[my]"
+}
+
+_require_kernel_config()
+{
+ _has_kernel_config $1 || _notrun "Installed kernel not built with $1"
+}
+
init_rc
################################################################################