summaryrefslogtreecommitdiff
path: root/recipes/initscripts/files
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/initscripts/files
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/initscripts/files')
-rw-r--r--recipes/initscripts/files/arm/alignment.sh6
-rw-r--r--recipes/initscripts/files/devpts5
-rw-r--r--recipes/initscripts/files/finish.sh6
-rw-r--r--recipes/initscripts/files/functions17
-rw-r--r--recipes/initscripts/files/halt25
-rw-r--r--recipes/initscripts/files/hostname.sh12
-rw-r--r--recipes/initscripts/files/reboot11
-rw-r--r--recipes/initscripts/files/rmnologin14
-rw-r--r--recipes/initscripts/files/save-rtc.sh5
-rw-r--r--recipes/initscripts/files/sendsigs17
-rw-r--r--recipes/initscripts/files/umountfs18
-rw-r--r--recipes/initscripts/files/umountnfs.sh28
-rw-r--r--recipes/initscripts/files/volatiles40
13 files changed, 204 insertions, 0 deletions
diff --git a/recipes/initscripts/files/arm/alignment.sh b/recipes/initscripts/files/arm/alignment.sh
new file mode 100644
index 0000000000..32a9eaace2
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/devpts b/recipes/initscripts/files/devpts
new file mode 100644
index 0000000000..e10e371662
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/finish.sh b/recipes/initscripts/files/finish.sh
new file mode 100644
index 0000000000..4f9f75f47c
--- /dev/null
+++ b/recipes/initscripts/files/finish.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+if ! test -e /etc/.configured; then
+ > /etc/.configured
+fi
+
diff --git a/recipes/initscripts/files/functions b/recipes/initscripts/files/functions
new file mode 100644
index 0000000000..fb9a914e4d
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/halt b/recipes/initscripts/files/halt
new file mode 100644
index 0000000000..d8cab222ca
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/hostname.sh b/recipes/initscripts/files/hostname.sh
new file mode 100644
index 0000000000..1a3fd2f17e
--- /dev/null
+++ b/recipes/initscripts/files/hostname.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+#
+# 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/recipes/initscripts/files/reboot b/recipes/initscripts/files/reboot
new file mode 100644
index 0000000000..56278199be
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/rmnologin b/recipes/initscripts/files/rmnologin
new file mode 100644
index 0000000000..444145a26a
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/save-rtc.sh b/recipes/initscripts/files/save-rtc.sh
new file mode 100644
index 0000000000..e786073051
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/sendsigs b/recipes/initscripts/files/sendsigs
new file mode 100644
index 0000000000..c62a5cd37d
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/umountfs b/recipes/initscripts/files/umountfs
new file mode 100644
index 0000000000..ec75b0c4a4
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/umountnfs.sh b/recipes/initscripts/files/umountnfs.sh
new file mode 100644
index 0000000000..f5fe48aa74
--- /dev/null
+++ b/recipes/initscripts/files/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/recipes/initscripts/files/volatiles b/recipes/initscripts/files/volatiles
new file mode 100644
index 0000000000..fbcc858226
--- /dev/null
+++ b/recipes/initscripts/files/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
+