diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-04-10 01:31:25 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-04-10 01:31:25 +0000 |
commit | 8b33f4401625beb0012cfef04469c69afd89aab9 (patch) | |
tree | dc1b73ad8b6b0c9ec562b96ed2deffa1fff3c817 /etc | |
parent | 75b187ba48191c6331683b8e925ecbd5204fd208 (diff) | |
download | pfsense-8b33f4401625beb0012cfef04469c69afd89aab9.zip pfsense-8b33f4401625beb0012cfef04469c69afd89aab9.tar.gz |
Turn binary_update item into a callable shell function
Diffstat (limited to 'etc')
-rwxr-xr-x | etc/rc.firmware | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/etc/rc.firmware b/etc/rc.firmware index b513390..f611eda 100755 --- a/etc/rc.firmware +++ b/etc/rc.firmware @@ -94,12 +94,20 @@ pfSenseupgrade) /sbin/shutdown -r now ;; pfSense) - cd /tmp/ && for i in `tar tf /tmp/latest.tgz; do (tar xvzf /tmp/latest.tgz $i; bspatch $i /i$; rm $i); done + binary_update /tmp/latest.tgz ;; pfSense_base) - cd /tmp/ && for i in `tar tf /tmp/latest_base.tgz; do (tar xvzf /tmp/latest_base.tgz $i; bspatch $i /i$; rm $i); done + binary_update /tmp/latest_base.tgz ;; pfSense_kernel) - cd /tmp/ && for i in `tar tf /tmp/latest_kernel.tgz; do (tar xvzf /tmp/latest_kernel.tgz $i; bspatch $i /i$; rm $i); done + binary_update /tmp/latest_kernel.tgz ;; -esac
\ No newline at end of file +esac + +binary_update() { + TGZ=$1 + cd /tmp/ + for i in `tar tf $TGZ; + do (tar xvzf /tmp/latest.tgz $i; cp /$i bspatch $i /i$; rm $i); + done +} |