Dies ist eine mehrteilige Nachricht im MIME-Format.
--------------9652C368D6E9348802C06E91
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
I have created a Shorewall RPM update script.
The main problem with Shorewall/RPM updates was that configuration
usually kept working but changes in comments, the one in the original
files, were lost. It''s of course not a problem of shorewall or RPM,
it''s
just the way how we update manually edited config files.
My solution was to create a script which updates shorewall via RPM but
patches the original config files.
I put the script shorewall-rpm-update.sh into the directory which
contains all the shorewall rpms and start it with
./shorewall-rpm-update.sh. Basically it performs the following steps:
- make some sanity checks (is ''patch'' installed, do we have
newer and
the currently installed rpm available...)
- save current /etc/shorewall to /root/shorewall-$rpmversion
- extract the rpm of the currently installed version to a temp directory
- create a diff of all changes to files in /etc/shorewall
- update shorewall to the newest version
- patch config files in /etc/shorewall
BIG FAT WARNING:
This script works for me. Don''t trust it blindly. I post it here
because
it may be useful for others but use at your own risk. Don''t cry if it
breaks your hole firewall.
BTW, the script doesn''t convert config file versions. If you upgrade
from 1.2 -> 1.3, you''ll have to modify by hand.
Simon
--------------9652C368D6E9348802C06E91
Content-Type: application/octet-stream;
name="shorewall-rpm-update.sh"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="shorewall-rpm-update.sh"
IyEvYmluL3NoCgpCTj1gYmFzZW5hbWUgJDBgClBBQ0tBR0U9YGZpbmQgc2hvcmV3YWxsLT8u
Py4/Ki0/Lm5vYXJjaC5ycG0gMj4gL2Rldi9udWxsIHwgdGFpbCAtbjFgCkNVUlZFUj1gcnBt
IC1xIHNob3Jld2FsbGAKQ1VSUEFDSz0iJENVUlZFUi5ub2FyY2gucnBtIgoKd2hpY2ggZGlm
ZiA+IC9kZXYvbnVsbCAyPiYxCmlmIFsgJD8gLW5lIDAgXTsgdGhlbgogIGVjaG8gIiQwOiBD
YW4ndCBmaW5kIGRpZmYsIGV4aXRpbmcuLi4iCiAgZXhpdCAxCmZpCgp3aGljaCBwYXRjaCA+
IC9kZXYvbnVsbCAyPiYxCmlmIF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