Project

General

Profile

« Previous | Next » 

Revision 7105aae8

Added by Scott Ullrich over 20 years ago

  • Cleanup firmware upgrade
  • Only attempt mount of wrap or soekris platofmrs

View differences:

etc/rc.conf_mount_ro
30 30
*/
31 31

  
32 32
require("config.inc");
33
require("xmlparse_pkg.inc");
34 33

  
35 34
conf_mount_ro();
36 35

  
etc/rc.conf_mount_rw
30 30
*/
31 31

  
32 32
require("config.inc");
33
require("xmlparse_pkg.inc");
34 33

  
35 34
conf_mount_rw();
36 35

  
etc/rc.firmware_auto
23 23
#echo "Downloading $FMFILENAME.md5 from $FMBASEURL ..."  | logger -p daemon.info -i -t AutoUpgrade
24 24
#/usr/bin/fetch -o /tmp/latest.tgz.md5 $FETCHFILENAME.md5 | logger -p daemon.info -i -t AutoUpgrade
25 25

  
26
PMD=`/bin/cat /tmp/latest.tgz.md5 | cut -d" " -f4 `;
27
MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`;
26
PMD=`/bin/cat /tmp/latest.tgz.md5 | cut -d" " -f4 `
27
MD=`/sbin/md5 /tmp/latest.tgz | cut -d" " -f4`
28

  
29
PLATFORM=`cat /etc/version`
28 30

  
29 31
echo "   Package MD5: ${PMD}" | logger -p daemon.info -i -t AutoUpgrade
30 32
echo "Downloaded MD5: ${MD}"  | logger -p daemon.info -i -t AutoUpgrade
......
41 43

  
42 44
if [ "$PMD" = "$MD" ]; then
43 45
        echo "MD5's match."  | logger -p daemon.info -i -t AutoUpgrade
44
        /etc/rc.conf_mount_rw
46
        if [ "$PLATFORM" = "net45xx" ]; then
47
            /usr/local/bin/php /etc/rc.conf_mount_rw
48
        fi
49
        if [ "$PLATFORM" = "wrap" ]; then
50
            /usr/local/bin/php /etc/rc.conf_mount_rw
51
        fi
45 52
        if [ -r "/tmp/custom.tgz" ]; then
46
            /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
53
            sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz /tmp/custom.tgz
47 54
        else
48
            /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz
55
            sh /etc/rc.firmware pfSenseupgrade /tmp/latest.tgz
56
        fi
57
        if [ "$PLATFORM" = "wrap" ]; then        
58
            /usr/local/bin/php /etc/rc.conf_mount_ro
49 59
        fi
50
        /etc/rc.conf_mount_ro
60
        if [ "$PLATFORM" = "net45xx" ]; then        
61
            /usr/local/bin/php /etc/rc.conf_mount_ro
62
        fi        
51 63
        exit 0
52 64
fi
53 65

  

Also available in: Unified diff