Copy modprobe file to system only if modprobe.d folder exists

This commit is contained in:
HikariKnight 2022-03-12 18:00:41 +01:00
parent 55434fb26d
commit dde49a43c8
No known key found for this signature in database
GPG key ID: E8B239063B022F5A

View file

@ -58,8 +58,12 @@ backup skipped.
function copy_FILES () {
echo "Starting copying files to the system!"
if [ -d "/etc/modprobe.d" ];
then
sudo cp -v "$SCRIPTDIR/$MODPROBE/vfio.conf" "/etc/modprobe.d/vfio.conf"
fi
if [ -d "/etc/initramfs-tools" ];
then
sudo cp -v "$SCRIPTDIR/$ETCMODULES" "/etc/modules"