To answer your question, most accurately, no sudo isn't considered universal. Truthfully the entire concept of 'universal', is often a red herring. This is especially true, with regard to cross-distro compatibility. Once your throw in the multitude of differing software versions, universality becomes semi-unrealistic. Scripting by nature is pragmatic, if it was pedantic, writing portable scripts would be practically impossible.
Normally I gauge my intended executing environment, A semi-modern Linux distribution, I expect a POSIX shell with the common GNU Utils. For scripts that could run outside of Linux, I only expect full POSIX standard.
Obviously many scripts are specific to Linux, or specific to distro, so that often narrows the portability scope.
To address your specific scripting case,
#!/bin/sh
## Exit Point
die() {
[ -n "$2" ] && echo "$2"
exit $1
}
## Require SuperUser Execution, Otherwise Re-Execute
[ `id -u` -ne 0 ] && {
command -v lsb_release > /dev/null && {
DISTRO="`lsb_release -is`"
[ "$DISTRO" = "Ubuntu" ] && SUPERUSER='sudo'
}
SUPERUSER="${SUPERUSER:-su}"
case "$SUPERUSER" in
su)
su -c "$0"
;;
sudo)
sudo "$0"
;;
esac
}
## Require SuperUser Execution
[ `id -u` -ne 0 ] && die 78
echo 'Script Executed by UID'
id -u
## Clean Up
die 0
that pasted script is POSIX shell compliment, I always write Dash compatible.