Skip to content

Commit

Permalink
Enforce bootpartition to be different from rootpartition
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Guyot <pguyot@kallisys.net>
  • Loading branch information
pguyot committed May 5, 2023
1 parent e3c2a98 commit 0342b61
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 [ $rootpartition -eq $bootpartition ]; then
echo "Boot partition cannot be equal to root partition"
if [ $bootpartition -eq 1 ]; then
echo "Forgot to unset bootpartition ?"
fi
exit 1
fi
else
bootpartition=
fi
Expand Down

0 comments on commit 0342b61

Please sign in to comment.