rbashrun can now run from root

This commit is contained in:
斟酌 鵬兄 2016-05-12 10:45:34 +08:00
parent 4e87e85986
commit 5cdb134ebc

View File

@ -179,14 +179,15 @@ function rbash_upgrade {
function rbash_run { function rbash_run {
echo "Getting: $1" echo "Getting: $1"
__cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/$1;hb=HEAD" __cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=$1;hb=HEAD"
shift shift
__uuid TMPID __uuid TMPID
TMPFILE=/tmp/$TMPID TMPFILE=/tmp/$TMPID
__cryptd "$__CFILE" "$TMPFILE" __cryptd "$__CFILE" "$TMPFILE"
bash "$TMPFILE" $@ chmod 700 "$TMPFILE"
rm "$TMPFILE"; "$TMPFILE" $@
rm "$TMPFILE"
} }
export PS1='This is <MACHINE_NAME>\e[1;3<COLOR_CODE>m<MACHINE_COLORED_NAME>\e[0m: \w\n\$ ' export PS1='This is <MACHINE_NAME>\e[1;3<COLOR_CODE>m<MACHINE_COLORED_NAME>\e[0m: \w\n\$ '