diff options
author | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-09-17 18:01:23 +0000 |
---|---|---|
committer | Stefan Schmidt <stefan@datenfreihafen.org> | 2009-09-17 18:38:25 +0000 |
commit | e8622747c60b148e94f095c4bb7fe40fc52bba0a (patch) | |
tree | 76274bb2dfc0fdc63e419144deccc3a85a087378 /recipes/shr/initscripts-shr/mountkernfs.sh | |
parent | 80c55c2574e99f025d88608966b09fcc578ed4f5 (diff) |
initscripts-shr: Add SHR initscripts (from SHR)
Diffstat (limited to 'recipes/shr/initscripts-shr/mountkernfs.sh')
-rw-r--r-- | recipes/shr/initscripts-shr/mountkernfs.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/recipes/shr/initscripts-shr/mountkernfs.sh b/recipes/shr/initscripts-shr/mountkernfs.sh new file mode 100644 index 0000000000..1ed09fcf05 --- /dev/null +++ b/recipes/shr/initscripts-shr/mountkernfs.sh @@ -0,0 +1,33 @@ +#!/bin/sh + +supported_kernel() { + case "$(uname -r)" in + 2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;; + 2.6.1[0-7]|2.6.1[0-7][!0-9]*) return 1 ;; + esac + return 0 +} + +check_kernel() { + if ! supported_kernel; then + echo "WARNING: kernel < 2.6.18" + fi + + if ! grep -qs devpts /proc/filesystems; then + echo "WARNING: kernel does not support devpts" + fi + + if ! grep -qs tmpfs /proc/filesystems; then + echo "WARNING: kernel does not support tmpfs" + fi +} + +if [ -d /proc ]; then + mount -n -t proc proc /proc +fi + +check_kernel + +if [ -d /sys ]; then + mount -n -t sysfs sysfs /sys +fi |