My sketch of a script for automatic migration is: ...
# │firmware-dev
c
My sketch of a script for automatic migration is: 1. Check
/proc/cmdline
for
postupdate
, indicating that this is the first boot of a new firmware version. Exit successfully if this is not present. 2. Check for a "breadcrumb" file that marks that the migration has already happened. Exit successfully if this exists. 3. Scan
/etc/network/interfaces
to see if any (non-comment) items mention
eth0
. If not, create the breadcrumb and exit successfully as migration is not required. 4. At this point, the migration needs to be performed. Check if it can be done safely:
/etc/network/interfaces
must NOT mention
br0
and MUST contain exactly one
auto eth0
and
iface eth0 ...
stanza. There must be no other mentions of
eth0
outside of these two lines. If any of these conditions are not met, trigger a reboot to rollback the upgrade. 5. Perform the migration:
s/eth0/br0/
and insert the
bridge-ports node1 node2 node3 node4 ge0 ge1
line under the
iface br0
stanza. Save the old file as
/etc/network/interfaces.old
, put the new file in
/etc/network/interfaces
, create the breadcrumb, and exit successfully.