test for uuidgen
This commit is contained in:
parent
ebfe2f3ba9
commit
53155d5587
@ -110,9 +110,17 @@ function __cacheDownload {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function __uuid {
|
||||||
|
if [ -x uuidgen ]; then
|
||||||
|
uuidgen
|
||||||
|
else
|
||||||
|
cat /proc/sys/kernel/random/uuid
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function rbash_upgrade {
|
function rbash_upgrade {
|
||||||
echo "Updating the .bashrc"
|
echo "Updating the .bashrc"
|
||||||
TMPFILE=/tmp/$( cat /proc/sys/kernel/random/uuid )
|
TMPFILE=/tmp/$( __uuid )
|
||||||
curl -s "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/rbashrc;hb=HEAD" > $TMPFILE
|
curl -s "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/rbashrc;hb=HEAD" > $TMPFILE
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
if [ -z "$1" ]; then
|
||||||
@ -123,8 +131,8 @@ function rbash_upgrade {
|
|||||||
MCC_NAME=$2
|
MCC_NAME=$2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
UUID=$( cat /proc/sys/kernel/random/uuid )
|
UUID=$( __uuid )
|
||||||
PASS=$( cat /proc/sys/kernel/random/uuid )
|
PASS=$( __uuid )
|
||||||
PMC_NAME=$( echo "#_MACHINE_NAME_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
PMC_NAME=$( echo "#_MACHINE_NAME_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
||||||
PMCC_NAME=$( echo "#_MACHINE_COLORED_NAME_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
PMCC_NAME=$( echo "#_MACHINE_COLORED_NAME_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
||||||
UUID_TOK=$( echo "#_UUID_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
UUID_TOK=$( echo "#_UUID_#" | sed -e "s/#_/</g" -e "s/_#/>/g" )
|
||||||
@ -144,7 +152,7 @@ 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=bash/$1;hb=HEAD"
|
||||||
shift
|
shift
|
||||||
TMPFILE=/tmp/$( cat /proc/sys/kernel/random/uuid )
|
TMPFILE=/tmp/$( __uuid )
|
||||||
__cryptd "$__CFILE" "$TMPFILE"
|
__cryptd "$__CFILE" "$TMPFILE"
|
||||||
|
|
||||||
bash "$TMPFILE" $@
|
bash "$TMPFILE" $@
|
||||||
@ -166,7 +174,7 @@ function __ns {
|
|||||||
echo " $1"
|
echo " $1"
|
||||||
__cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/$FPATH;hb=HEAD"
|
__cacheDownload "http://git.astropenguin.net/?p=utils.git;a=blob_plain;f=bash/bashrc/$FPATH;hb=HEAD"
|
||||||
shift
|
shift
|
||||||
TMPFILE=/tmp/$( cat /proc/sys/kernel/random/uuid )
|
TMPFILE=/tmp/$( __uuid )
|
||||||
__cryptd "$__CFILE" "$TMPFILE"
|
__cryptd "$__CFILE" "$TMPFILE"
|
||||||
. $TMPFILE
|
. $TMPFILE
|
||||||
rm $TMPFILE
|
rm $TMPFILE
|
||||||
|
Loading…
Reference in New Issue
Block a user