bootable/newinstaller
Révision | 7eb0735bd8d579133126b41c0d716ea0b456f5ed (tree) |
---|---|
l'heure | 2017-10-26 15:54:14 |
Auteur | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
init: skip to mount unknown type partitions
Trying to mount an unknown type partition may cause kernel panic.
@@ -3,7 +3,7 @@ | ||
3 | 3 | # By Chih-Wei Huang <cwhuang@linux.org.tw> |
4 | 4 | # and Thorsten Glaser <tg@mirbsd.org> |
5 | 5 | # |
6 | -# Last updated 2017/07/17 | |
6 | +# Last updated 2017/10/06 | |
7 | 7 | # |
8 | 8 | # License: GNU Public License |
9 | 9 | # We explicitely grant the right to use the scripts |
@@ -75,6 +75,7 @@ check_root() | ||
75 | 75 | blk=`basename $1` |
76 | 76 | [ ! -e /dev/block/$blk ] && ln $1 /dev/block |
77 | 77 | dev=/dev/block/$blk |
78 | + blkid $dev | grep -q TYPE || return 1 | |
78 | 79 | else |
79 | 80 | dev=$1 |
80 | 81 | fi |