Skip to content

Instantly share code, notes, and snippets.

@OothecaPickle
Last active January 25, 2025 20:59
Show Gist options
  • Save OothecaPickle/51ccb485e8093b99b1d5f8cbb3638c33 to your computer and use it in GitHub Desktop.
Save OothecaPickle/51ccb485e8093b99b1d5f8cbb3638c33 to your computer and use it in GitHub Desktop.
Boot Partition Switch Function for OpenWrt on Linksys HomeWRK (add to .profile)
switch_part() {
if [ $1 = 1 ]; then
fw_setenv switch_part 1 && fw_setenv msmparts ' ' && fw_setenv switch_num
elif [ $1 = 2 ]; then
fw_setenv switch_part 2 && fw_setenv msmparts '0x1db00000@0x4a00000(fs)' && fw_setenv switch_num
else
echo "Usage: switch_part [1|2]"
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment