summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0/openslug
diff options
context:
space:
mode:
Diffstat (limited to 'packages/initscripts/initscripts-1.0/openslug')
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/.mtn2git_empty0
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/alignment.sh20
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/banner4
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/domainname.sh5
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/rootopts.patch15
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/umountfs43
-rw-r--r--packages/initscripts/initscripts-1.0/openslug/umountnfs.sh40
7 files changed, 127 insertions, 0 deletions
diff --git a/packages/initscripts/initscripts-1.0/openslug/.mtn2git_empty b/packages/initscripts/initscripts-1.0/openslug/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/openslug/.mtn2git_empty
diff --git a/packages/initscripts/initscripts-1.0/openslug/alignment.sh b/packages/initscripts/initscripts-1.0/openslug/alignment.sh
index e69de29bb2..bf193cb01c 100644
--- a/packages/initscripts/initscripts-1.0/openslug/alignment.sh
+++ b/packages/initscripts/initscripts-1.0/openslug/alignment.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# How to handle alignment faults on the ARM
+#
+# 0 - ignore, the value will probably be rotated
+# 1 - warn, a log message will be output
+# 2 - fixup, the kernel will do an expensive aligned read
+# 3 - fixup+warn
+# 4 - signal, the process will get an illegal instruction fault
+# 5 - signal+warn
+# 6 - invalid (has no effect)
+# 7 - invalid (has no effect)
+#
+# Set ALIGN in /etc/default/rcS to override (do not edit this
+# file!) Set ALIGN to empty to avoid changing the kernel
+# default (currently '0').
+ALIGN=1
+. /etc/default/rcS
+test -e /proc/cpu/alignment -a -n "$ALIGN" -a "$ALIGN" -ge 0 -a "$ALIGN" -lt 6 &&
+ echo "$ALIGN" >/proc/cpu/alignment
diff --git a/packages/initscripts/initscripts-1.0/openslug/banner b/packages/initscripts/initscripts-1.0/openslug/banner
index e69de29bb2..d80fb19fe4 100644
--- a/packages/initscripts/initscripts-1.0/openslug/banner
+++ b/packages/initscripts/initscripts-1.0/openslug/banner
@@ -0,0 +1,4 @@
+#!/bin/sh
+#NOTE: this script may execute with absolutely nothing
+# in /dev
+echo "OpenSlug booting..."
diff --git a/packages/initscripts/initscripts-1.0/openslug/domainname.sh b/packages/initscripts/initscripts-1.0/openslug/domainname.sh
index e69de29bb2..7113467d8c 100644
--- a/packages/initscripts/initscripts-1.0/openslug/domainname.sh
+++ b/packages/initscripts/initscripts-1.0/openslug/domainname.sh
@@ -0,0 +1,5 @@
+#
+# domainname.sh Set the domainname.
+#
+test -r /etc/defaultdomain &&
+ cat /etc/defaultdomain >/proc/sys/kernel/domainname
diff --git a/packages/initscripts/initscripts-1.0/openslug/rootopts.patch b/packages/initscripts/initscripts-1.0/openslug/rootopts.patch
index e69de29bb2..3f2a925879 100644
--- a/packages/initscripts/initscripts-1.0/openslug/rootopts.patch
+++ b/packages/initscripts/initscripts-1.0/openslug/rootopts.patch
@@ -0,0 +1,15 @@
+#
+# Ensure that the root file system is remounted with the correct
+# options from fstab
+#
+--- old/checkroot.sh 2005-05-28 19:30:55.488975598 -0700
++++ new/checkroot.sh 2005-05-28 19:31:32.334390450 -0700
+@@ -149,7 +149,7 @@
+ # is on a ro fs until the remount succeeded. Then clean up old mtabs
+ # and finally write the new mtab.
+ #
+-mount -n -o remount,$rootmode /
++mount -n -o remount,$rootopts /
+ if test "$rootmode" = rw
+ then
+ if test ! -L /etc/mtab
diff --git a/packages/initscripts/initscripts-1.0/openslug/umountfs b/packages/initscripts/initscripts-1.0/openslug/umountfs
index e69de29bb2..d6f432dbda 100644
--- a/packages/initscripts/initscripts-1.0/openslug/umountfs
+++ b/packages/initscripts/initscripts-1.0/openslug/umountfs
@@ -0,0 +1,43 @@
+#! /bin/sh
+#
+# umountfs Turn off swap and unmount all local filesystems.
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# Ensure /proc is mounted
+test -r /proc/mounts || mount -t proc proc /proc
+
+echo "Deactivating swap..."
+swapoff -a
+
+# We leave /proc mounted, the umount of /dev/devpts seems to fail
+# quite frequently, the busybox umount apparently gives up at the
+# first failure, so it is necessary to go file system by file
+# system. It is necessary to go backward in the /proc list, because
+# later things may have been mounted on earlier mounts.
+devfs=
+unmount() {
+ local dev mp type opts
+ if read dev mp type opts
+ then
+ # recurse - unmount later items
+ unmount
+ # skip /proc and /dev but not the sub-directories
+ case "$mp" in
+ /|/proc)return 0;;
+ /dev) devfs=1
+ return 0;;
+ esac
+ # then unmount this, if possible, otherwise make
+ # it read-only
+ umount -f -r "$mp"
+ fi
+}
+
+echo "Unmounting local filesystems..."
+unmount </proc/mounts
+
+# now /dev and read-only / (halt/reboot may need /proc!)
+test -n "$devfs" && umount -f -r /dev
+mount -o remount,ro /
diff --git a/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh b/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh
index e69de29bb2..994a919225 100644
--- a/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh
+++ b/packages/initscripts/initscripts-1.0/openslug/umountnfs.sh
@@ -0,0 +1,40 @@
+#! /bin/sh
+#
+# umountnfs.sh Unmount all network filesystems.
+#
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# Write a reboot record to /var/log/wtmp before unmounting
+halt -w
+
+# Ensure /proc is mounted
+test -r /proc/mounts || mount -t proc proc /proc
+
+echo "Unmounting remote filesystems..."
+
+#
+# Read the list of mounted file systems and -f umount the
+# known network file systems. -f says umount it even if
+# the server is unreachable. Do not attempt to umount
+# the root file system. Unmount in reverse order from
+# that given by /proc/mounts (otherwise it may not work).
+#
+unmount() {
+ local dev mp type opts
+ if read dev mp type opts
+ then
+ # recurse - unmount later items
+ unmount
+ # skip /, /proc and /dev
+ case "$mp" in
+ /|/proc)return 0;;
+ /dev) return 0;;
+ esac
+ # then unmount this, if nfs
+ case "$type" in
+ nfs|smbfs|ncpfs) umount -f "$mp";;
+ esac
+ fi
+}
+
+unmount </proc/mounts