Need to repartition and reinstall a server without rebooting, all over SSH? Sure, why not! https://github.com/marcan/takeover.sh …
-
-
-
Replying to @marcan42
set -e is wrong because half of the steps need rollback to avoid brick
1 reply 0 retweets 0 likes -
Replying to @trufae
Wrong. None of the steps *at all* affect the running OS in any way until the last two lines, mount and telinit.
1 reply 0 retweets 0 likes -
If mount fails you can umount /sbin manually. After telinit all bets are off.
1 reply 0 retweets 0 likes -
Replying to @marcan42
yes manually you can always fix anything. But for me the purpose of the script is to avoid human interaction.
1 reply 0 retweets 0 likes -
Replying to @trufae
The purpose of the script is not to try to take care of all possible scenarios. It's just a reference for a known working recipe.
2 replies 0 retweets 1 like -
Replying to @marcan42
yep: i guess its cool tor your usecase. But that may fail in several other systems, with systemd, without working libc, etc
1 reply 0 retweets 0 likes
Not having a working libc is a bigger problem, you'd need to get that fixed first. As for systemd, it can be adapted for it.
-
-
Replying to @marcan42
the if[]exit can be removed because of the set -e, but set -e is silent,what about using set -ve and use comments instead of echo?
1 reply 0 retweets 0 likes -
Replying to @trufae
I personally prefer general status echos and relying on commands printing error messages on failure, but set -ve is a valid style.
1 reply 0 retweets 1 like - Show replies
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.