Skip to content

Commit

Permalink
Enforce bootpartition to be different from rootpartition (#76)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
  • Loading branch information
pguyot committed Aug 26, 2023
1 parent 973ce28 commit 8b6c7c1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mount_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ rootpartition=$4

if [ $# -ge 5 ]; then
bootpartition=$5
if [ "x$rootpartition" = "x$bootpartition" ]; then
echo "Boot partition cannot be equal to root partition"
if [ "x$bootpartition" = "x1" ]; then
echo "Forgot to unset bootpartition ?"
fi
exit 1
fi
else
bootpartition=
fi
Expand Down

0 comments on commit 8b6c7c1

Please sign in to comment.