pfsense/pfsense — pull request #602 by evansus (2013-04-24 09:20:23+00:00)
Title: ZFSROOT not hardcoded to zpool or dataset 'tank'

For ZFS root readonly case, the WHEREISROOT variable was grep-ing for 'tank', expecting a zpool with that name.

A workaround of naming a dataset 'tank', for example, 'sys/ROOT/tank' or 'sys/tank/pfSense' is compatible, however this shouldn't be hardcoded in.

My proposed change replaces WHEREISROOT with ZFSROOT using awk. I noticed awk is used elsewhere in this script. However it is still simple code that is not resilient against unexpected circumstances, let alone failure.