When a full upgrade from 2.1.x to 2.2 is being done, after decompress tarball with 2.2 files, /bin/sh is not able to run a script using syntax 'sh scriptname'. Because of that, /tmp/post_upgrade_command and /etc/rc.reboot are not executed ending on an incomplete and broken update.
Since we need to fix it only touching 2.2 files, the only way I found to workaround the situation is to use pre_upgrade_command script to:
- Copy /bin/sh to /tmp/sh.old - Change /etc/rc.firmware to use sh.old when calling post_upgrade_command and rc.reboot - Kill current rc.firmware process - Start a new rc.firmware using same parameters
This issue doesn't affect nanobsd or 2.2 -> 2.2 updates
Fix #3749:
When a full upgrade from 2.1.x to 2.2 is being done, after decompress
tarball with 2.2 files, /bin/sh is not able to run a script using syntax
'sh scriptname'. Because of that, /tmp/post_upgrade_command and
/etc/rc.reboot are not executed ending on an incomplete and broken
update.
Since we need to fix it only touching 2.2 files, the only way I found to
workaround the situation is to use pre_upgrade_command script to:
- Copy /bin/sh to /tmp/sh.old
- Change /etc/rc.firmware to use sh.old when calling
post_upgrade_command and rc.reboot
- Kill current rc.firmware process
- Start a new rc.firmware using same parameters
This issue doesn't affect nanobsd or 2.2 -> 2.2 updates