MFC 11444

Fix crappy logic so it works on cdrom as well. We we're just lucky on embedded.
This commit is contained in:
Scott Ullrich 2006-04-15 17:16:15 +00:00
parent 50556d95e9
commit 3901cd3b81

View File

@ -1864,7 +1864,7 @@ function enable_rrd_graphing()
/* 3MB is enough for everyone. *cough* */
if($g['platform'] != "pfSense") {
/* determine highest MD device */
$mdnr = `mount | awk -F"md" '/dev\/md/ {print $2}'|cut -c 1`;
$mdnr = `mount | grep md | awk -F"md" '{print $2}'|tail -1 |cut -c 1`;
$mdnr = $mdnr +1;
system("/sbin/mdmfs -M -s 3m md$mdnr $rrddbpath");
}