backport 2.4 changes to shell/ and net/util/ #559

we have not changed much in these directories, we can take most of their changes wholesale

fixes #559