summaryrefslogtreecommitdiff
path: root/auto/kanotix
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2010-09-06 04:35:26 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2010-09-06 04:35:26 +0200
commit6a889c01a73b48882c481d23f2b05d9000f56f2f (patch)
treea1d28312aca72cb073a6b2ce3db7865e2fcd125c /auto/kanotix
parentac89baf038cdb9d9abfeb439b81562078a573604 (diff)
downloadkanotix-6a889c01a73b48882c481d23f2b05d9000f56f2f.zip
kanotix-6a889c01a73b48882c481d23f2b05d9000f56f2f.tar.gz
changed the auto/*-scripts, added additional kanotix arguments
this replaces the old tmpfs.disabled directory, therefor it is removed
Diffstat (limited to 'auto/kanotix')
-rwxr-xr-xauto/kanotix76
1 files changed, 76 insertions, 0 deletions
diff --git a/auto/kanotix b/auto/kanotix
new file mode 100755
index 0000000..ac6ec48
--- /dev/null
+++ b/auto/kanotix
@@ -0,0 +1,76 @@
+#!/bin/bash
+
+[ -f config/kanotix ] && . config/kanotix
+
+usage()
+{
+cat <<eof
+
+Additional Options for Kanotix:
+ [--include-nvidia true|false]
+ [--tmpfs true|false]
+ [--tmpfs-options OPTIONS]
+
+eof
+}
+
+write_kanotix_config()
+{
+[ -z "${LH_KANOTIX_NVIDIA}" ] && LH_KANOTIX_NVIDIA="true"
+[ -z "${LH_KANOTIX_TMPFS}" ] && [ -d tmpfs ] && LH_KANOTIX_TMPFS="true"
+[ -z "${LH_KANOTIX_TMPFS}" ] && LH_KANOTIX_TMPFS="false"
+[ -z "${LH_KANOTIX_TMPFS_OPTIONS}" ] && [ -f tmpfs/options ] && LH_KANOTIX_TMPFS_OPTIONS="$(<tmpfs/options)"
+[ -z "${LH_KANOTIX_TMPFS_OPTIONS}" ] && LH_KANOTIX_TMPFS_OPTIONS="defaults"
+cat >config/kanotix << EOF
+# config/kanotix - additional options for Kanotix
+
+# \$LH_KANOTIX_NVIDIA: include NVidia-Drivers into chroot
+# (Default: ${LH_KANOTIX_NVIDIA})
+LH_KANOTIX_NVIDIA="${LH_KANOTIX_NVIDIA}"
+
+# \$LH_KANOTIX_TMPFS: use tmpfs to build
+# (Default: ${LH_KANOTIX_TMPFS})
+LH_KANOTIX_TMPFS="${LH_KANOTIX_TMPFS}"
+
+# \$LH_KANOTIX_TMPFS_OPTIONS: options for tmpfs
+# (Default: ${LH_KANOTIX_TMPFS_OPTIONS})
+LH_KANOTIX_TMPFS_OPTIONS="${LH_KANOTIX_TMPFS_OPTIONS}"
+
+EOF
+grep -q ". config/kanotix" config/all 2>/dev/null || echo ". config/kanotix" >> config/all
+}
+
+# process Kanotix config values
+unset args; i=1
+while [ "$1" ]
+do
+ case "$1" in
+ --include-nvidia)
+ LH_KANOTIX_NVIDIA="$2"
+ shift
+ ;;
+ --tmpfs)
+ LH_KANOTIX_TMPFS="$2"
+ shift
+ ;;
+ --tmpfs-options)
+ LH_KANOTIX_TMPFS_OPTIONS="$2"
+ shift
+ ;;
+ --help|-h)
+ lh config noauto --help
+ usage
+ exit 1
+ ;;
+ *)
+ args[$i]="$1"
+ ((i++))
+ ;;
+ esac
+ shift
+done
+
+set -- "${args[@]}"
+
+write_kanotix_config
+