aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristos.K <freedomrfox@gmail.com>2017-06-30 06:07:13 +0300
committerChristos.K <freedomrfox@gmail.com>2017-06-30 06:07:13 +0300
commit52b3177a4ddb81840742bee2800d3f60913713f0 (patch)
treee1779d3d13ef8c711924d18c31cf4d0c67b25fdf
parentIncluded tee (diff)
downloadGSE-52b3177a4ddb81840742bee2800d3f60913713f0.tar.gz
GSE-52b3177a4ddb81840742bee2800d3f60913713f0.tar.bz2
GSE-52b3177a4ddb81840742bee2800d3f60913713f0.zip
Controller functions
-rw-r--r--config.d/controller/modules/cfunctions.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/config.d/controller/modules/cfunctions.sh b/config.d/controller/modules/cfunctions.sh
new file mode 100644
index 0000000..f91dfd4
--- /dev/null
+++ b/config.d/controller/modules/cfunctions.sh
@@ -0,0 +1,42 @@
+#!/bin/bash
+
+_bsu_dfs() {
+ # EXPORT BOOT DEVICE
+ BOOTDEV="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep BOOT | awk -F ' ' '{ print $2 }')"
+ export BOOTDEV
+
+ # EXPORT SYSTEM DEVICE
+ SYSDEV="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep SYS | awk -F ' ' '{ print $2 }')"
+ export SYSDEV
+
+ # EXPORT USERDATA DEVICE
+ USERDATADEV="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep USERDATA | awk -F ' ' '{ print $2 }')"
+ export USERDATADEV
+
+ # SOURCE THE SOURCES CONFIGURATION FILES FOR EXPORTING THE SERVER INFORMATIONS
+ source "${CTCONFDIR}/sources/sources.conf"
+
+ # EXPORT THE BOOT FILE SYSTEM TYPE
+ BOOTFS="$(cat fstab.info | sed '/^#/ d' | sed '/^\s*$/d' | grep BOOT | awk -F ' ' '{ print $2 }')"
+ export BOOTFS
+
+ # EXPORT THE SYSTEM FILE SYSTEM TYPE
+ SYSFS="$(cat fstab.info | sed '/^#/ d' | sed '/^\s*$/d' | grep SYS | awk -F ' ' '{ print $2 }')"
+ export SYSFS
+
+ # EXPORT THE USERDATA FILE STSTEM TYPE
+ USERDATAFS="$(cat fstab.info | sed '/^#/ d' | sed '/^\s*$/d' | grep USERDATA | awk -F ' ' '{ print $2 }')"
+ export USERDATAFS
+
+ # EXPORT BOOT SIZE
+ BOOTSFS="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep BOOT | awk -F ' ' '{ print $3 }')"
+ export BOOTSFS
+
+ # EXPORT SYSTEM SIZE
+ SYSSFS="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep SYS | awk -F ' ' '{ print $3 }')"
+ export SYSSFS
+
+ # EXPORT USERDATA SIZE
+ USERDATASFS="$(cat devname.info | sed '/^#/ d' | sed '/^\s*$/d' | grep USERDATA | awk -F ' ' '{ print $3 }')"
+ export USERDATASFS
+} \ No newline at end of file