summaryrefslogtreecommitdiffstats
path: root/data/disk-tmp.sh
diff options
context:
space:
mode:
authorSimon Rettberg2013-03-19 19:42:41 +0100
committerSimon Rettberg2013-03-19 19:42:41 +0100
commit61b94929a4d429a8480dcc06487c52be15db5e1f (patch)
tree871d76618b66216ec5adb6446907a7ea8bde8ebd /data/disk-tmp.sh
parentTweak modules to work with openSUSE 12.1 (diff)
parentEnable /tmp on ID44 partition if available. (diff)
downloadtm-scripts-61b94929a4d429a8480dcc06487c52be15db5e1f.tar.gz
tm-scripts-61b94929a4d429a8480dcc06487c52be15db5e1f.tar.xz
tm-scripts-61b94929a4d429a8480dcc06487c52be15db5e1f.zip
Merge branch 'master' of ssh://openslx/openslx-ng/tm-scripts
Diffstat (limited to 'data/disk-tmp.sh')
-rw-r--r--data/disk-tmp.sh23
1 files changed, 23 insertions, 0 deletions
diff --git a/data/disk-tmp.sh b/data/disk-tmp.sh
new file mode 100644
index 00000000..842d8230
--- /dev/null
+++ b/data/disk-tmp.sh
@@ -0,0 +1,23 @@
+#!/bin/sh
+# Copyright (c) 2013 - OpenSLX GmbH
+#
+# This program is free software distributed under the GPL version 2.
+# See http://openslx.org/COPYING
+#
+# If you have any feedback please consult http://openslx.org/feedback and
+# send your feedback to feedback@openslx.org
+#
+# General information about OpenSLX can be found under http://openslx.org
+#
+# Mount local ID44 partition to /tmp after all existing stuff is preserved
+
+#############################################################################
+
+# Check if ID44 is available by analysing /etc/fstab for appropriate entry
+if grep -qe "/dev/.*/tmp" /etc/fstab 2>/dev/null ; then
+ mkdir -p /run/tmp
+ mv /tmp/* /run/tmp
+ mount --move /run/mount/tmp /tmp
+ mv /run/tmp/* /tmp
+ rmdir /run/tmp
+fi