From e7eae989f474cecf7638674cbfd9b042356fdf3b Mon Sep 17 00:00:00 2001 From: Dirk Date: Tue, 19 Mar 2013 18:51:22 +0100 Subject: Enable /tmp on ID44 partition if available. --- data/analyse-disk.sh | 4 ++-- data/disk-tmp.sh | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 data/disk-tmp.sh diff --git a/data/analyse-disk.sh b/data/analyse-disk.sh index 908ee298..a7145427 100644 --- a/data/analyse-disk.sh +++ b/data/analyse-disk.sh @@ -45,8 +45,8 @@ for fs in xfs ext3 ext2 ; do ;; esac mkfs.$fs ${fopt} ${target} >/dev/null 2>&1 #|| error - mkdir -p /var/mnt/tmp - mount -t ${fs} ${target} /var/mnt/tmp + mkdir -p /run/mount/tmp + mount -t ${fs} ${target} /run/mount/tmp fi done [ -z $found ] && continue 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 -- cgit v1.2.3-55-g7522