Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove False Positive Errors When Using 'livenet' And Squashfs #2595

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
45 changes: 25 additions & 20 deletions modules.d/90dmsquash-live/dmsquash-live-root.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,32 @@ get_check_dev() {
echo "$_udevinfo" | grep "DEVNAME=" | sed 's/DEVNAME=//'
}

# Find the right device to run check on
check_dev=$(get_check_dev "$livedev")
# CD/DVD media check
[ -b "$check_dev" ] && fs=$(det_fs "$check_dev")
if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
check="yes"
fi
getarg rd.live.check -d check || check=""
if [ -n "$check" ]; then
type plymouth > /dev/null 2>&1 && plymouth --hide-splash
if [ -n "$DRACUT_SYSTEMD" ]; then
p=$(dev_unit_name "$check_dev")
systemctl start checkisomd5@"${p}".service
else
checkisomd5 --verbose "$check_dev"
# Check ISO checksum only if we have a path to a block device (or just its name
# without '/dev'). In other words, in this context, we perform the check only
# if the given $livedev is not a filesystem file image.
if [ ! -f "$livedev" ]; then
# Find the right device to run check on
check_dev=$(get_check_dev "$livedev")
# CD/DVD media check
[ -b "$check_dev" ] && fs=$(det_fs "$check_dev")
if [ "$fs" = "iso9660" -o "$fs" = "udf" ]; then
check="yes"
fi
if [ $? -eq 1 ]; then
die "CD check failed!"
exit 1
getarg rd.live.check -d check || check=""
if [ -n "$check" ]; then
type plymouth > /dev/null 2>&1 && plymouth --hide-splash
if [ -n "$DRACUT_SYSTEMD" ]; then
p=$(dev_unit_name "$check_dev")
systemctl start checkisomd5@"${p}".service
else
checkisomd5 --verbose "$check_dev"
fi
if [ $? -eq 1 ]; then
die "CD check failed!"
exit 1
fi
type plymouth > /dev/null 2>&1 && plymouth --show-splash
fi
type plymouth > /dev/null 2>&1 && plymouth --show-splash
fi

ln -s "$livedev" /run/initramfs/livedev
Expand Down Expand Up @@ -109,7 +114,7 @@ if [ -f "$livedev" ]; then
auto) die "cannot mount live image (unknown filesystem type)" ;;
*) FSIMG=$livedev ;;
esac
[ -e /sys/fs/"$fstype" ] || modprobe "$fstype"
load_fstype "$fstype"
else
livedev_fstype=$(det_fs "$livedev")
if [ "$livedev_fstype" = "squashfs" ]; then
Expand Down