From e76de94e76a7c7a49a1bbdba5f17d193d2e27adb Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 17 May 2005 22:11:56 +0000 Subject: Add initial support for usb pen drives when using a read only cd version of pfSense --- etc/inc/config.inc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'etc') diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 9b9d6e3..f23d70b 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -55,6 +55,14 @@ if ($g['booting'] and !file_exists($g['cf_conf_path'] . "/config.xml") ) { if (strstr($g['platform'], "cdrom")) { /* config is on floppy disk for CD-ROM version */ $cfgdevice = $cfgpartition = "fd0"; + $dmesg = `dmesg -a`; + if(ereg("da0", $desg) == true) { + $cfgdevice = $cfgpartition = "da0" ; + if (mwexec("/sbin/mount -r da0 /cf") <> 0) { + /* could not mount, fallback to floppy */ + $cfgdevice = $cfgpartition = "fd0"; + } + } $cfgfstype = "msdos"; } else { /* probe kernel known disks until we find one with config.xml */ -- cgit v1.1