diff --git a/initramfs/init b/initramfs/init index 8286f69..67cddc1 100755 --- a/initramfs/init +++ b/initramfs/init @@ -1,23 +1,27 @@ #!/busybox sh +NORMAL="\\033[0m" +FAIL="\\033[1;31m" +OK="\\033[1;32m" +INFO="\\033[1;34m" + die() { echo "" - echo "Shit broke! Panic shell!" + echo -e "${FAIL}Shit broke! Panic shell!${NORMAL}" echo "" /busybox --install -s exec /bin/sh } - info() { - echo -n "-|-" ${@} "... " + echo -en "-${INFO}|${NORMAL}-" ${@} "... " } isok() { if [[ $1 -eq 0 ]]; then - echo "[ OK ]" + echo -e "${INFO}[ ${OK}OK${INFO} ]${NORMAL}" else - echo "[ FUCK ]" + echo -e "${INFO}[ ${FAIL}FUCK${INFO} ]${NORMAL}" die fi } @@ -90,6 +94,7 @@ info "checking if ${filename} exists" isok $? info "unpacking; will take some time" +echo "" /pv /mnt/${filename} | /busybox tar -C /roottmpfs -xJf - info "unmounting rootfs package location" @@ -108,7 +113,7 @@ info "trying to switch root" exec /busybox switch_root /roottmpfs /sbin/init echo "" -echo "we should not reach this place! here be dragons!" +echo -e "${FAIL}we should not reach this place! here be dragons!${NORMAL}" echo "" die