Project

General

Profile

Download (1.39 KB) Statistics
| Branch: | Tag: | Revision:
1
#!/bin/sh
2
#
3
# rc.cdrom - livedisc specific routines
4
# For pfSense
5

    
6
# Run some FreeSBIE routines
7
/etc/rc.d/freesbie_1st
8

    
9
# Start PFI
10
/bin/sh /scripts/pfi start
11

    
12
# If PFI did not find a config, this will not be
13
# a directory.  Go ahead and populate with stock
14
# configuration.
15
if [ ! -f /cf/conf/config.xml ]; then
16
    mkdir -p /cf/conf
17
    echo "Copying /FreeSBIE/cf/conf/* /cf/conf/"
18
    /rescue/cp /FreeSBIE/cf/conf/* /cf/conf/
19
fi                                          
20

    
21
# If by this time /conf doesn't exist then lets
22
# go ahead and link /conf to /cf/conf
23
if [ ! -L /conf ]; then       
24
    /rescue/ln -s /cf/conf /conf
25
fi
26

    
27
# Create factory default restore directory
28
/bin/mkdir -p /conf.default/
29

    
30
# If the default config.xml and ez-ipupdate.cache do not exist,
31
# lets populate them from the default (factory configuration)
32
# files.
33
if [ ! -f /cf/conf/config.xml ]; then
34
    echo "Copying config.xml to /cf/conf/"
35
    /rescue/cp /FreeSBIE/cf/conf/config.xml /cf/conf/
36
fi
37
if [ ! -f /conf.default/config.xml ]; then
38
    echo "Copying config.xml to /conf.default/conf/"
39
    /rescue/cp /FreeSBIE/conf.default/config.xml /conf.default/config.xml
40
fi
41
if [ ! -f /cf/conf/ez-ipupdate.cache ]; then
42
    echo "Copying ez-ipupdate.cache to /cf/conf/"
43
    /rescue/cp /FreeSBIE/cf/conf/ez-ipupdate.cache /cf/conf/ez-ipupdate.cache
44
fi
45

    
46
# Create some needed directories
47
/bin/mkdir -p /var/db/pkg/
48
/bin/mkdir -p /var/tmp/vi.recover/
(26-26/62)