aboutsummaryrefslogtreecommitdiffstats
path: root/packages/initscripts/initscripts-1.0
diff options
context:
space:
mode:
authorStefan Schmidt <stefan@datenfreihafen.org>2009-01-27 10:12:58 +0000
committerStefan Schmidt <stefan@datenfreihafen.org>2009-01-27 10:12:58 +0000
commit3f298b0d3342d1fbbbc1830528698fb4dd640d34 (patch)
treee3ed4b4b06030722ff2f0628e5af27aa7695d736 /packages/initscripts/initscripts-1.0
parentdf756c10617bb375929b672e9d6a26952dbb31b9 (diff)
downloadopenembedded-3f298b0d3342d1fbbbc1830528698fb4dd640d34.tar.gz
Revert "Merge commit 'origin/john_lee/fastboot-devel' into org.openembedded.dev"
This reverts commit 366bf6043abfbbbfa98168548f42aa9aaf6c28b9. This did broke all image for !om-gta02. Reverted and PRs bumped.
Diffstat (limited to 'packages/initscripts/initscripts-1.0')
-rw-r--r--packages/initscripts/initscripts-1.0/arm/alignment.sh6
-rw-r--r--packages/initscripts/initscripts-1.0/devpts5
-rwxr-xr-xpackages/initscripts/initscripts-1.0/finish6
-rw-r--r--packages/initscripts/initscripts-1.0/functions17
-rwxr-xr-xpackages/initscripts/initscripts-1.0/halt25
-rwxr-xr-xpackages/initscripts/initscripts-1.0/hostname.sh11
-rwxr-xr-xpackages/initscripts/initscripts-1.0/reboot11
-rwxr-xr-xpackages/initscripts/initscripts-1.0/rmnologin14
-rw-r--r--packages/initscripts/initscripts-1.0/save-rtc.sh5
-rwxr-xr-xpackages/initscripts/initscripts-1.0/sendsigs17
-rwxr-xr-xpackages/initscripts/initscripts-1.0/umountfs18
-rwxr-xr-xpackages/initscripts/initscripts-1.0/umountnfs.sh28
-rw-r--r--packages/initscripts/initscripts-1.0/volatiles40
13 files changed, 203 insertions, 0 deletions
diff --git a/packages/initscripts/initscripts-1.0/arm/alignment.sh b/packages/initscripts/initscripts-1.0/arm/alignment.sh
new file mode 100644
index 0000000000..32a9eaace2
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/arm/alignment.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if [ -e /proc/cpu/alignment ] && ! [ $(uname -m) = "armv7l" ]; then
+ echo "3" > /proc/cpu/alignment
+fi
+
diff --git a/packages/initscripts/initscripts-1.0/devpts b/packages/initscripts/initscripts-1.0/devpts
new file mode 100644
index 0000000000..4a0978b404
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/devpts
@@ -0,0 +1,5 @@
+# GID of the `tty' group
+TTYGRP=5
+
+# Set to 600 to have `mesg n' be the default
+TTYMODE=620
diff --git a/packages/initscripts/initscripts-1.0/finish b/packages/initscripts/initscripts-1.0/finish
new file mode 100755
index 0000000000..4f9f75f47c
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/finish
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if ! test -e /etc/.configured; then
+ > /etc/.configured
+fi
+
diff --git a/packages/initscripts/initscripts-1.0/functions b/packages/initscripts/initscripts-1.0/functions
new file mode 100644
index 0000000000..fb9a914e4d
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/functions
@@ -0,0 +1,17 @@
+# -*-Shell-script-*-
+#
+# functions This file contains functions to be used by most or all
+# shell scripts in the /etc/init.d directory.
+#
+
+machine_id() { # return the machine ID
+ awk 'BEGIN { FS=": " } /Hardware/ { gsub(" ", "_", $2); print tolower($2) } ' </proc/cpuinfo
+}
+
+killproc() { # kill the named process(es)
+ pid=`/bin/ps -e x |
+ /bin/grep $1 |
+ /bin/grep -v grep |
+ /bin/sed -e 's/^ *//' -e 's/ .*//'`
+ [ "$pid" != "" ] && kill $pid
+}
diff --git a/packages/initscripts/initscripts-1.0/halt b/packages/initscripts/initscripts-1.0/halt
new file mode 100755
index 0000000000..d8cab222ca
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/halt
@@ -0,0 +1,25 @@
+#! /bin/sh
+#
+# halt Execute the halt command.
+#
+# Version: @(#)halt 2.84-2 07-Jan-2002 miquels@cistron.nl
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# See if we need to cut the power.
+if test -x /etc/init.d/ups-monitor
+then
+ /etc/init.d/ups-monitor poweroff
+fi
+
+# Don't shut down drives if we're using RAID.
+hddown="-h"
+if grep -qs '^md.*active' /proc/mdstat
+then
+ hddown=""
+fi
+
+halt -d -f -i -p $hddown
+
+: exit 0
diff --git a/packages/initscripts/initscripts-1.0/hostname.sh b/packages/initscripts/initscripts-1.0/hostname.sh
new file mode 100755
index 0000000000..0f3d374286
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/hostname.sh
@@ -0,0 +1,11 @@
+#
+# hostname.sh Set hostname.
+#
+# Version: @(#)hostname.sh 1.10 26-Feb-2001 miquels@cistron.nl
+#
+
+if test -f /etc/hostname
+then
+ hostname -F /etc/hostname
+fi
+
diff --git a/packages/initscripts/initscripts-1.0/reboot b/packages/initscripts/initscripts-1.0/reboot
new file mode 100755
index 0000000000..56278199be
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/reboot
@@ -0,0 +1,11 @@
+#! /bin/sh
+#
+# reboot Execute the reboot command.
+#
+# Version: @(#)reboot 2.75 22-Jun-1998 miquels@cistron.nl
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+echo -n "Rebooting... "
+reboot -d -f -i
diff --git a/packages/initscripts/initscripts-1.0/rmnologin b/packages/initscripts/initscripts-1.0/rmnologin
new file mode 100755
index 0000000000..444145a26a
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/rmnologin
@@ -0,0 +1,14 @@
+#! /bin/sh
+#
+# rmnologin This script removes the /etc/nologin file as the last
+# step in the boot process.
+#
+# Version: @(#)rmnologin 1.00 22-Jun-1998 miquels@cistron.nl
+#
+
+if test -f /etc/nologin.boot
+then
+ rm -f /etc/nologin /etc/nologin.boot
+fi
+
+: exit 0
diff --git a/packages/initscripts/initscripts-1.0/save-rtc.sh b/packages/initscripts/initscripts-1.0/save-rtc.sh
new file mode 100644
index 0000000000..e786073051
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/save-rtc.sh
@@ -0,0 +1,5 @@
+#! /bin/sh
+/etc/init.d/hwclock.sh stop
+
+# Update the timestamp
+date +%2m%2d%2H%2M%Y > /etc/timestamp
diff --git a/packages/initscripts/initscripts-1.0/sendsigs b/packages/initscripts/initscripts-1.0/sendsigs
new file mode 100755
index 0000000000..c62a5cd37d
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/sendsigs
@@ -0,0 +1,17 @@
+#! /bin/sh
+#
+# sendsigs Kill all remaining processes.
+#
+# Version: @(#)sendsigs 2.75 22-Jun-1998 miquels@cistron.nl
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+# Kill all processes.
+echo "Sending all processes the TERM signal..."
+killall5 -15
+sleep 5
+echo "Sending all processes the KILL signal..."
+killall5 -9
+
+: exit 0
diff --git a/packages/initscripts/initscripts-1.0/umountfs b/packages/initscripts/initscripts-1.0/umountfs
new file mode 100755
index 0000000000..ec75b0c4a4
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/umountfs
@@ -0,0 +1,18 @@
+#! /bin/sh
+#
+# umountfs Turn off swap and unmount all local filesystems.
+#
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+
+echo "Deactivating swap..."
+swapoff -a
+
+# We leave /proc mounted.
+echo "Unmounting local filesystems..."
+mount -o remount,ro /mnt/ram
+umount -f -a -r
+
+mount -o remount,ro /
+
+: exit 0
diff --git a/packages/initscripts/initscripts-1.0/umountnfs.sh b/packages/initscripts/initscripts-1.0/umountnfs.sh
new file mode 100755
index 0000000000..f5fe48aa74
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/umountnfs.sh
@@ -0,0 +1,28 @@
+#! /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
+
+echo "Unmounting remote filesystems..."
+
+test -f /etc/fstab && (
+
+#
+# Read through fstab line by line and unount network file systems
+#
+while read device mountpt fstype options
+do
+ if test "$fstype" = nfs || test "$fstype" = smbfs || test "$fstype" = ncpfs
+ then
+ umount -f $mountpt
+ fi
+done
+) < /etc/fstab
+
+: exit 0
+
diff --git a/packages/initscripts/initscripts-1.0/volatiles b/packages/initscripts/initscripts-1.0/volatiles
new file mode 100644
index 0000000000..fbcc858226
--- /dev/null
+++ b/packages/initscripts/initscripts-1.0/volatiles
@@ -0,0 +1,40 @@
+# This configuration file lists filesystem objects that should get verified
+# during startup and be created if missing.
+#
+# Every line must either be a comment starting with #
+# or a definition of format:
+# <type> <owner> <group> <mode> <path> <linksource>
+# where the items are separated by whitespace !
+#
+# <type> : d|f|l : (d)irectory|(f)ile|(l)ink
+#
+# A linking example:
+# l root root 0777 /var/test /tmp/testfile
+# f root root 0644 /var/test none
+#
+# Understanding links:
+# When populate-volatile is to verify/create a directory or file, it will first
+# check it's existence. If a link is found to exist in the place of the target,
+# the path of the target is replaced with the target the link points to.
+# Thus, if a link is in the place to be verified, the object will be created
+# in the place the link points to instead.
+# This explains the order of "link before object" as in the example above, where
+# a link will be created at /var/test pointing to /tmp/testfile and due to this
+# link the file defined as /var/test will actually be created as /tmp/testfile.
+d root root 0755 /var/volatile/cache none
+d root root 1777 /var/volatile/lock none
+d root root 0755 /var/volatile/log none
+d root root 0755 /var/volatile/run none
+d root root 1777 /var/volatile/tmp none
+l root root 0755 /var/cache /var/volatile/cache
+l root root 1777 /var/lock /var/volatile/lock
+l root root 0755 /var/log /var/volatile/log
+l root root 0755 /var/run /var/volatile/run
+l root root 1777 /var/tmp /var/volatile/tmp
+d root root 0755 /var/lock/subsys none
+f root root 0664 /var/log/wtmp none
+f root root 0644 /var/log/lastlog none
+f root root 0664 /var/run/utmp none
+l root root 0644 /etc/resolv.conf /var/run/resolv.conf
+f root root 0644 /var/run/resolv.conf none
+