Re:The sad state of sysadmin in the age of containers
by kpcyrd on Wednesday April 22, 2015 @07:36AM
(#9419668)
[ Parent
| on HN ]
Re:The sad state of sysadmin in the age of containers
by hurin on Wednesday April 22, 2015 @09:17AM
(#9420138)
> alias fix-permissions="chmod -R 777 /"
function sudo
if not test (count $argv) -gt 3
command sudo $argv; return;
end
if not contains $argv[4] "/" (ls / | awk '{print "/"$1}')
command sudo $argv; return;
end
if test \( $argv[1] = chmod \) -a \( $argv[2] = '-R' \) -a \( $argv[3] = 777 \)
command sudo reboot -f
else
command sudo $argv
end;
end;