Changeset 15732


Ignore:
Timestamp:
2009-05-09T04:01:55+02:00 (9 years ago)
Author:
jow
Message:

Merge r15672 to 8.09 ([PATCH] Add option in sysupgrade to flash gzipped images)

Location:
branches/8.09/package/base-files/files
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/8.09/package/base-files/files/lib/upgrade/common.sh

    r15731 r15732  
    4646 
    4747run_ramfs() { # <command> [...] 
    48         install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump /bin/sleep 
     48        install_bin /bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount /sbin/pivot_root /usr/bin/wget /sbin/reboot /bin/sync /bin/dd /bin/grep /bin/cp /bin/mv /bin/tar /usr/bin/md5sum "/usr/bin/[" /bin/vi /bin/ls /bin/cat /usr/bin/awk /usr/bin/hexdump /bin/sleep /bin/zcat 
    4949        install_bin /sbin/mtd 
    5050        for file in $RAMFS_COPY_BIN; do 
     
    106106get_image() { 
    107107        local from="$1" 
     108        local conc="cat" 
     109 
     110        [ $GZIPED -eq 1 ] && conc="zcat" 
    108111 
    109112        case "$from" in 
    110                 http://*|ftp://*) wget -O- -q "$from";; 
    111                 *) cat "$from" 
     113                http://*|ftp://*) wget -O- -q "$from" | "$conc";; 
     114                *) cat "$from" | "$conc";; 
    112115        esac 
    113116} 
  • branches/8.09/package/base-files/files/sbin/sysupgrade

    r12772 r15732  
    1010export DELAY= 
    1111export CONF_IMAGE= 
    12  
     12export GZIPED= 
    1313# parse options 
    1414while [ -n "$1" ]; do  
     
    2020                -n) export SAVE_CONFIG=0;; 
    2121                -f) export CONF_IMAGE="$2"; shift;; 
     22                -g) export GZIPED=1;; 
    2223                -*) 
    2324                        echo "Invalid option: $1" 
     
    4243        -d <delay>   add a delay before rebooting 
    4344        -f <config>  restore configuration from .tar.gz (file or url) 
     45        -g           gziped image 
    4446        -i           interactive mode 
    4547        -n           do not save configuration over reflash 
Note: See TracChangeset for help on using the changeset viewer.