diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-05-17 22:11:56 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-05-17 22:11:56 +0000 |
commit | e76de94e76a7c7a49a1bbdba5f17d193d2e27adb (patch) | |
tree | 66ada9e463202fc2d792e440169a0acbba345179 /etc | |
parent | 1ed4805f8ffa1f0dda137631856a942e5f237263 (diff) | |
download | pfsense-e76de94e76a7c7a49a1bbdba5f17d193d2e27adb.zip pfsense-e76de94e76a7c7a49a1bbdba5f17d193d2e27adb.tar.gz |
Add initial support for usb pen drives when using a read only cd version
of pfSense
Diffstat (limited to 'etc')
-rw-r--r-- | etc/inc/config.inc | 8 |
1 files changed, 8 insertions, 0 deletions
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 */ |