Add motd, prompt and haveged
Change-Id: I82b2a6c5beaa0faeece8834d289c9b5d4be86274
diff --git a/linux/system/haveged.yml b/linux/system/haveged.yml
new file mode 100644
index 0000000..5c0be15
--- /dev/null
+++ b/linux/system/haveged.yml
@@ -0,0 +1,5 @@
+parameters:
+ linux:
+ system:
+ haveged:
+ enabled: true
diff --git a/linux/system/motd/dynamic.yml b/linux/system/motd/dynamic.yml
new file mode 100644
index 0000000..9589e8e
--- /dev/null
+++ b/linux/system/motd/dynamic.yml
@@ -0,0 +1,19 @@
+parameters:
+ linux:
+ system:
+ motd:
+ - warning: |
+ #!/bin/sh
+ printf "WARNING: This is private network.\n"
+ printf " Unauthorized access is strictly prohibited.\n"
+ printf "\n"
+ - info: |
+ #!/bin/sh
+ printf -- "------------------------------------------------------\n"
+ printf " Hostname | $(hostname)\n"
+ printf " Domain | $(hostname -d)\n"
+ printf " System | %s\n" "$(lsb_release -s -d)"
+ printf " Kernel | %s\n" "$(uname -r)"
+ printf " Uptime | %s\n" "$(uptime -p)"
+ printf " Load Average | %s\n" "$(cat /proc/loadavg | awk '{print $1", "$2", "$3}')"
+ printf -- "------------------------------------------------------\n"
diff --git a/linux/system/motd/static.yml b/linux/system/motd/static.yml
new file mode 100644
index 0000000..774abc6
--- /dev/null
+++ b/linux/system/motd/static.yml
@@ -0,0 +1,12 @@
+parameters:
+ linux:
+ system:
+ motd: |
+ WARNING: This is private network
+ Unauthorized access is strictly prohibited
+
+ ------------------------------------------------------
+ Hostname | ${linux:system:name}
+ Domain | ${linux:system:domain}
+ ------------------------------------------------------
+
diff --git a/linux/system/prompt/init.yml b/linux/system/prompt/init.yml
new file mode 100644
index 0000000..2f0120d
--- /dev/null
+++ b/linux/system/prompt/init.yml
@@ -0,0 +1,7 @@
+parameters:
+ linux:
+ system:
+ prompt:
+ default: \\n\\[\\033[0;37m\\]\\D{%y/%m/%d %H:%M:%S} ${linux:system:name}.${linux:system:domain}\\[\\e[0m\\]\\n\\[\\e[1;39m\\][\\u@\\h:\\w]\\[\\e[0m\\]
+ bash:
+ preserve_history: true
diff --git a/linux/system/prompt/production.yml b/linux/system/prompt/production.yml
new file mode 100644
index 0000000..723503a
--- /dev/null
+++ b/linux/system/prompt/production.yml
@@ -0,0 +1,7 @@
+classes:
+ - linux.system.prompt
+parameters:
+ linux:
+ system:
+ prompt:
+ default: \\n\\[\\033[0;37m\\]\\D{%y/%m/%d %H:%M:%S} ${linux:system:name}.${linux:system:domain}\\[\\e[0m\\]\\n\\[\\e[1;31m\\][\\u@\\h:\\w]\\[\\e[0m\\]