From 5cdb134ebc5bfffe2dbcddb55823b9b4b0871abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=9F=E9=85=8C=20=E9=B5=AC=E5=85=84?= Date: Thu, 12 May 2016 10:45:34 +0800 Subject: [PATCH] rbashrun can now run from root --- bash/bashrc/rbashrc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bash/bashrc/rbashrc b/bash/bashrc/rbashrc index 6925123..0acc496 100644 --- a/bash/bashrc/rbashrc +++ b/bash/bashrc/rbashrc @@ -179,14 +179,15 @@ function rbash_upgrade { function rbash_run { 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 __uuid TMPID TMPFILE=/tmp/$TMPID __cryptd "$__CFILE" "$TMPFILE" - bash "$TMPFILE" $@ - rm "$TMPFILE"; + chmod 700 "$TMPFILE" + "$TMPFILE" $@ + rm "$TMPFILE" } export PS1='This is \e[1;3m\e[0m: \w\n\$ '