summaryrefslogtreecommitdiffstats
path: root/data
diff options
context:
space:
mode:
authorJonathan Bauer2013-04-03 15:39:20 +0200
committersr2013-04-12 19:11:40 +0200
commit9ee2ccd9d85c865954bf52e2013ab57d8c2f0374 (patch)
tree6cd743a8ad082d5456c2660ff989041e51b7de35 /data
parentSize calculation fixed (diff)
downloadtm-scripts-9ee2ccd9d85c865954bf52e2013ab57d8c2f0374.tar.gz
tm-scripts-9ee2ccd9d85c865954bf52e2013ab57d8c2f0374.tar.xz
tm-scripts-9ee2ccd9d85c865954bf52e2013ab57d8c2f0374.zip
fixes for disk scripts
Diffstat (limited to 'data')
-rwxr-xr-x[-rw-r--r--]data/analyse-disk.sh9
-rwxr-xr-x[-rw-r--r--]data/disk-tmp.sh5
-rw-r--r--data/printk.service6
3 files changed, 13 insertions, 7 deletions
diff --git a/data/analyse-disk.sh b/data/analyse-disk.sh
index a7145427..27c3f306 100644..100755
--- a/data/analyse-disk.sh
+++ b/data/analyse-disk.sh
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Copyright (c) 2013 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
@@ -27,7 +27,7 @@ for fs in xfs ext3 ext2 ; do
esac
if [ -n ${available} ]; then
unset found
- for path in /sbin /bin /usr/sbin /usr/bin ; do
+ for path in /sbin /bin /usr/sbin /usr/bin /openslx/sbin /openslx/bin; do
if test -x /$path/mkfs.$fs ; then
found=yes
case mkfs.$fs in
@@ -49,8 +49,7 @@ for fs in xfs ext3 ext2 ; do
mount -t ${fs} ${target} /run/mount/tmp
fi
done
- [ -z $found ] && continue
- else break
+ [ -n "$found" ] && break
fi
done
}
@@ -74,7 +73,7 @@ for hdpartnr in $(cat /etc/disk.partition | \
# echo "$hdpartnr is mounted to /mnt/tmp at $(sysup)" >/tmp/tmpready
echo -e "$hdpartnr\t/tmp\t\tnoauto\t\tdefaults\t 0 0" >>/etc/fstab
else
- echo "formatting failed for some reason ($(sysup))" >/tmp/tmpready
+ echo "formatting failed for some reason " >/tmp/tmpready
fi ) &
break
done
diff --git a/data/disk-tmp.sh b/data/disk-tmp.sh
index 842d8230..4378c45c 100644..100755
--- a/data/disk-tmp.sh
+++ b/data/disk-tmp.sh
@@ -14,10 +14,11 @@
#############################################################################
# Check if ID44 is available by analysing /etc/fstab for appropriate entry
-if grep -qe "/dev/.*/tmp" /etc/fstab 2>/dev/null ; then
+if cat /proc/mounts | grep -qe "/dev/.*/tmp" ; then
mkdir -p /run/tmp
mv /tmp/* /run/tmp
- mount --move /run/mount/tmp /tmp
+ mount --bind /run/mount/tmp /tmp
+ umount /run/mount/tmp
mv /run/tmp/* /tmp
rmdir /run/tmp
fi
diff --git a/data/printk.service b/data/printk.service
new file mode 100644
index 00000000..97fe8055
--- /dev/null
+++ b/data/printk.service
@@ -0,0 +1,6 @@
+[Unit]
+Description=shuts up kernel
+
+[Service]
+Type=simple
+ExecStart=/openslx/bin/echo "0" > /proc/sys/kernel/printk