enable test support for mkinitcpio and dracut
This commit is contained in:
parent
f3391a622e
commit
f196052c27
6 changed files with 44 additions and 13 deletions
|
@ -36,15 +36,19 @@ function make_BACKUP () {
|
|||
|
||||
fi
|
||||
|
||||
mkdir -p "$BACKUPDIR/etc/modprobe.d"
|
||||
|
||||
# If a vfio.conf file exists, backup that too
|
||||
if [ -f "/etc/modprobe.d/vfio.conf" ];
|
||||
if [ -d "/etc/modprobe.d" ];
|
||||
then
|
||||
cp -v "/etc/modprobe.d/vfio.conf" "$BACKUPDIR/etc/modprobe.d/vfio.conf"
|
||||
mkdir -p "$BACKUPDIR/etc/modprobe.d"
|
||||
|
||||
# If a vfio.conf file exists, backup that too
|
||||
if [ -f "/etc/modprobe.d/vfio.conf" ];
|
||||
then
|
||||
cp -v "/etc/modprobe.d/vfio.conf" "$BACKUPDIR/etc/modprobe.d/vfio.conf"
|
||||
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
|
||||
printf "Backup completed!\n"
|
||||
|
||||
else
|
||||
|
@ -79,6 +83,13 @@ Rebuilding initramfs"
|
|||
Rebuilding initramfs"
|
||||
sudo dracut -f -kver "$(uname -r)"
|
||||
|
||||
elif [ -f "/etc/mkinitcpio.conf" ];
|
||||
then
|
||||
cp -v "$SCRIPTDIR/$MKINITCPIO" "/etc/mkinitcpio.conf"
|
||||
echo "
|
||||
Rebuilding initramfs"
|
||||
sudo mkinitcpio -P
|
||||
|
||||
else
|
||||
echo "
|
||||
Unsupported initramfs infrastructure
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue