summaryrefslogtreecommitdiffstats
path: root/inc/functions.common.sh
diff options
context:
space:
mode:
Diffstat (limited to 'inc/functions.common.sh')
-rw-r--r--inc/functions.common.sh71
1 files changed, 71 insertions, 0 deletions
diff --git a/inc/functions.common.sh b/inc/functions.common.sh
new file mode 100644
index 0000000..75586c2
--- /dev/null
+++ b/inc/functions.common.sh
@@ -0,0 +1,71 @@
+SYSLINUX=${ROOT_DIR}/contrib/syslinux/latest
+PATH="${ROOT_DIR}/bin/:$PATH"
+
+QUIET="0"
+
+banner () {
+
+ echo -e "\t __ __ __ "
+ echo -e "\t.-----.| |--.--------.| |_| |--."
+ echo -e "\t| _ || _ | || _| < "
+ echo -e "\t| __||_____|__|__|__||____|__|__|"
+ echo -e "\t|__| "
+ echo -e "\t ** OpenSLX Project // 2011 **"
+ echo -e "\t http://lab.openslx.org/"
+ echo -e ""
+
+}
+
+set_quiet () {
+ if [ "x$DEBUG" != "x1" -a "x$QUIET" != "x1" ]; then
+ exec 6>&1 > $LOG_DIR/stdout.log
+ exec 2> $LOG_DIR/stderr.log
+ QUIET="1"
+ fi
+}
+
+unset_quiet () {
+ if [ "x$QUIET" = "x1" ]; then
+ exec 1>&6 6>&-
+ exec 2>&-
+ QUIET="0"
+ fi
+}
+
+
+pinfo () {
+ unset_quiet
+ echo -e "[info] $1"
+ set_quiet
+}
+perror () {
+ unset_quiet
+ echo -e "[error] $1"
+ set_quiet
+}
+pecho () {
+ unset_quiet
+ echo -e "[user] $1"
+ set_quiet
+}
+pechon () {
+ unset_quiet
+ echo -e -n "[user] $1"
+ set_quiet
+}
+
+getopt_start () {
+
+ GETOPT_TEMP=`getopt -o $SHORT_OPTS --long $LONG_OPTS \
+ -n "$SELF" -- "$@"`
+
+ if [ $? != 0 ] ; then
+ perror "Unknown option(s).\n"
+ print_usage
+ exit 1
+ fi
+}
+
+run_global_checks () {
+ :
+} \ No newline at end of file