summaryrefslogtreecommitdiff
path: root/packages/initscripts/initscripts-1.0
diff options
context:
space:
mode:
authorRene Wagner <rw@handhelds.org>2005-08-02 11:43:25 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-08-02 11:43:25 +0000
commitfec6d9b12d01c5a1c450108ffb838335862a4051 (patch)
tree1304c6e8f62cb2989e781ea73bdc848c5f00d125 /packages/initscripts/initscripts-1.0
parenta4dc9b83d233a7b07e920e0eeceffdcf2053ab02 (diff)
parent0bef08582a7aa3378ba6cb4d1899dd9ae7267483 (diff)
merge of 8893b7644179a244e95e78cea49c28cecbedc8b2
and 9ef371d5ab888cd926919c7bf505d283e4f19f54
Diffstat (limited to 'packages/initscripts/initscripts-1.0')
-rwxr-xr-xpackages/initscripts/initscripts-1.0/c7x0/keymap-2.6.map138
-rwxr-xr-xpackages/initscripts/initscripts-1.0/populate-volatile.sh168
-rw-r--r--packages/initscripts/initscripts-1.0/volatiles10
3 files changed, 200 insertions, 116 deletions
diff --git a/packages/initscripts/initscripts-1.0/c7x0/keymap-2.6.map b/packages/initscripts/initscripts-1.0/c7x0/keymap-2.6.map
index 85a194b850..dbfde00053 100755
--- a/packages/initscripts/initscripts-1.0/c7x0/keymap-2.6.map
+++ b/packages/initscripts/initscripts-1.0/c7x0/keymap-2.6.map
@@ -30,7 +30,7 @@ keycode 13 =
keycode 14 = BackSpace
altgr keycode 14 = Delete
keycode 15 = Tab
- shift keycode 65 = Caps_Lock
+ altgr keycode 15 = Caps_Lock
keycode 16 = q
keycode 17 = w
altgr keycode 17 = asciicircum
@@ -143,71 +143,71 @@ string Prior = "\033[5~"
string Next = "\033[6~"
string Macro = "\033[M"
string Pause = "\033[P"
-compose '`' 'A' to '�
-compose '`' 'a' to '�
-compose '\'' 'A' to '�
-compose '\'' 'a' to '�
-compose '^' 'A' to '�
-compose '^' 'a' to '�
-compose '~' 'A' to '�
-compose '~' 'a' to '�
-compose '"' 'A' to '�
-compose '"' 'a' to '�
-compose 'O' 'A' to '�
-compose 'o' 'a' to '�
-compose '0' 'A' to '�
-compose '0' 'a' to '�
-compose 'A' 'A' to '�
-compose 'a' 'a' to '�
-compose 'A' 'E' to '�
-compose 'a' 'e' to '�
-compose ',' 'C' to '�
-compose ',' 'c' to '�
-compose '`' 'E' to '�
-compose '`' 'e' to '�
-compose '\'' 'E' to '�
-compose '\'' 'e' to '�
-compose '^' 'E' to '�
-compose '^' 'e' to '�
-compose '"' 'E' to '�
-compose '"' 'e' to '�
-compose '`' 'I' to '�
-compose '`' 'i' to '�
-compose '\'' 'I' to '�
-compose '\'' 'i' to '�
-compose '^' 'I' to '�
-compose '^' 'i' to '�
-compose '"' 'I' to '�
-compose '"' 'i' to '�
-compose '-' 'D' to '�
-compose '-' 'd' to '�
-compose '~' 'N' to '�
-compose '~' 'n' to '�
-compose '`' 'O' to '�
-compose '`' 'o' to '�
-compose '\'' 'O' to '�
-compose '\'' 'o' to '�
-compose '^' 'O' to '�
-compose '^' 'o' to '�
-compose '~' 'O' to '�
-compose '~' 'o' to '�
-compose '"' 'O' to '�
-compose '"' 'o' to '�
-compose '/' 'O' to '�
-compose '/' 'o' to ''
-compose '`' 'U' to '�
-compose '`' 'u' to ''
-compose '\'' 'U' to '�
-compose '\'' 'u' to ''
-compose '^' 'U' to '�
-compose '^' 'u' to ''
-compose '"' 'U' to '�
-compose '"' 'u' to ''
-compose '\'' 'Y' to '�
-compose '\'' 'y' to ''
-compose 'T' 'H' to '�
-compose 't' 'h' to ''
-compose 's' 's' to '�
-compose '"' 'y' to ''
-compose 's' 'z' to '�
-compose 'i' 'j' to ''
+compose '`' 'A' to 'À'
+compose '`' 'a' to 'à'
+compose '\'' 'A' to 'Á'
+compose '\'' 'a' to 'á'
+compose '^' 'A' to 'Â'
+compose '^' 'a' to 'â'
+compose '~' 'A' to 'Ã'
+compose '~' 'a' to 'ã'
+compose '"' 'A' to 'Ä'
+compose '"' 'a' to 'ä'
+compose 'O' 'A' to 'Å'
+compose 'o' 'a' to 'å'
+compose '0' 'A' to 'Å'
+compose '0' 'a' to 'å'
+compose 'A' 'A' to 'Å'
+compose 'a' 'a' to 'å'
+compose 'A' 'E' to 'Æ'
+compose 'a' 'e' to 'æ'
+compose ',' 'C' to 'Ç'
+compose ',' 'c' to 'ç'
+compose '`' 'E' to 'È'
+compose '`' 'e' to 'è'
+compose '\'' 'E' to 'É'
+compose '\'' 'e' to 'é'
+compose '^' 'E' to 'Ê'
+compose '^' 'e' to 'ê'
+compose '"' 'E' to 'Ë'
+compose '"' 'e' to 'ë'
+compose '`' 'I' to 'Ì'
+compose '`' 'i' to 'ì'
+compose '\'' 'I' to 'Í'
+compose '\'' 'i' to 'í'
+compose '^' 'I' to 'Î'
+compose '^' 'i' to 'î'
+compose '"' 'I' to 'Ï'
+compose '"' 'i' to 'ï'
+compose '-' 'D' to 'Ð'
+compose '-' 'd' to 'ð'
+compose '~' 'N' to 'Ñ'
+compose '~' 'n' to 'ñ'
+compose '`' 'O' to 'Ò'
+compose '`' 'o' to 'ò'
+compose '\'' 'O' to 'Ó'
+compose '\'' 'o' to 'ó'
+compose '^' 'O' to 'Ô'
+compose '^' 'o' to 'ô'
+compose '~' 'O' to 'Õ'
+compose '~' 'o' to 'õ'
+compose '"' 'O' to 'Ö'
+compose '"' 'o' to 'ö'
+compose '/' 'O' to 'Ø'
+compose '/' 'o' to 'ø'
+compose '`' 'U' to 'Ù'
+compose '`' 'u' to 'ù'
+compose '\'' 'U' to 'Ú'
+compose '\'' 'u' to 'ú'
+compose '^' 'U' to 'Û'
+compose '^' 'u' to 'û'
+compose '"' 'U' to 'Ü'
+compose '"' 'u' to 'ü'
+compose '\'' 'Y' to 'Ý'
+compose '\'' 'y' to 'ý'
+compose 'T' 'H' to 'Þ'
+compose 't' 'h' to 'þ'
+compose 's' 's' to 'ß'
+compose '"' 'y' to 'ÿ'
+compose 's' 'z' to 'ß'
+compose 'i' 'j' to 'ÿ'
diff --git a/packages/initscripts/initscripts-1.0/populate-volatile.sh b/packages/initscripts/initscripts-1.0/populate-volatile.sh
index 311a2764da..99a469d576 100755
--- a/packages/initscripts/initscripts-1.0/populate-volatile.sh
+++ b/packages/initscripts/initscripts-1.0/populate-volatile.sh
@@ -1,64 +1,138 @@
#!/bin/sh
. /etc/default/rcS
-CFGFILE="/etc/default/volatiles"
+
+CFGDIR="/etc/default/volatiles"
+TMPROOT="/var/tmp"
+COREDEF="00_core"
[ "${VERBOSE}" != "no" ] && echo "Populating volatile Filesystems."
-cat ${CFGFILE} | grep -v "^#" | \
-while read LINE; do
- TTYPE=`echo ${LINE} | cut -d " " -f 1`
- TUSER=`echo ${LINE} | cut -d " " -f 2`
- TGROUP=`echo ${LINE} | cut -d " " -f 3`
- TMODE=`echo ${LINE} | cut -d " " -f 4`
- TNAME=`echo ${LINE} | cut -d " " -f 5`
- [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
+check_requirements() {
- [ "${TTYPE}" = "l" ] && {
- [ -e "${TNAME}" ] && {
- echo "Cannot create link over existing -${TNAME}-." >&2
- } || {
- TSOURCE=`echo ${LINE} | cut -d " " -f 6`
- [ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
- ln -s "${TSOURCE}" "${TNAME}"
- }
- continue
+ cleanup() {
+ rm "${TMP_INTERMED}"
+ rm "${TMP_DEFINED}"
+ rm "${TMP_COMBINED}"
}
+
+ CFGFILE="$1"
- [ -L "${TNAME}" ] && {
- [ "${VERBOSE}" != "no" ] && echo "Found link."
- NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
- echo ${NEWNAME} | grep -v "^/" >/dev/null && {
- TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
- [ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
- } || {
- TNAME="${NEWNAME}"
- [ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
- }
+ [ `basename "${CFGFILE}"` = "${COREDEF}" ] && return 0
+
+ TMP_INTERMED="${TMPROOT}/tmp.$$"
+ TMP_DEFINED="${TMPROOT}/tmpdefined.$$"
+ TMP_COMBINED="${TMPROOT}/tmpcombined.$$"
+
+
+ cat /etc/passwd | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
+ cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 2 > "${TMP_INTERMED}"
+ cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
+
+ NR_DEFINED_USERS="`cat "${TMP_DEFINED}" | wc -l`"
+ NR_COMBINED_USERS="`cat "${TMP_COMBINED}" | wc -l`"
+
+ [ "${NR_DEFINED_USERS}" -ne "${NR_COMBINED_USERS}" ] && {
+ echo "Undefined users:"
+ diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
+ cleanup
+ return 1
+ }
+
+
+ cat /etc/group | sed 's@\(^:\)*:.*@\1@' | sort | uniq > "${TMP_DEFINED}"
+ cat ${CFGFILE} | grep -v "^#" | cut -d " " -f 3 > "${TMP_INTERMED}"
+ cat "${TMP_DEFINED}" "${TMP_INTERMED}" | sort | uniq > "${TMP_COMBINED}"
+
+ NR_DEFINED_GROUPS="`cat "${TMP_DEFINED}" | wc -l`"
+ NR_COMBINED_GROUPS="`cat "${TMP_COMBINED}" | wc -l`"
+
+ [ "${NR_DEFINED_GROUPS}" -ne "${NR_COMBINED_GROUPS}" ] && {
+ echo "Undefined groups:"
+ diff "${TMP_DEFINED}" "${TMP_COMBINED}" | grep "^>"
+ cleanup
+ return 1
}
- [ -e "${TNAME}" ] && {
- [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
- continue
+ # Add checks for required directories here
+
+ cleanup
+ return 0
+ }
+
+apply_cfgfile() {
+
+ CFGFILE="$1"
+
+ check_requirements "${CFGFILE}" || {
+ echo "Skipping ${CFGFILE}"
+ return 1
}
- case "${TTYPE}" in
- "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
- touch "${TNAME}"
- ;;
- "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
- mkdir -p "${TNAME}"
- # Add check to see if there's an entry in fstab to mount.
- ;;
- *) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
- continue
- ;;
- esac
-
- chown ${TUSER} ${TNAME} || echo "Failed to set owner -${TUSER}- for -${TNAME}-." >&2
- chgrp ${TGROUP} ${TNAME} || echo "Failed to set group -${TGROUP}- for -${TNAME}-." >&2
- chmod ${TMODE} ${TNAME} || echo "Failed to set mode -${TMODE}- for -${TNAME}-." >&2
+ cat ${CFGFILE} | grep -v "^#" | \
+ while read LINE; do
+ TTYPE=`echo ${LINE} | cut -d " " -f 1`
+ TUSER=`echo ${LINE} | cut -d " " -f 2`
+ TGROUP=`echo ${LINE} | cut -d " " -f 3`
+ TMODE=`echo ${LINE} | cut -d " " -f 4`
+ TNAME=`echo ${LINE} | cut -d " " -f 5`
+
+ [ "${VERBOSE}" != "no" ] && echo "Checking for -${TNAME}-."
+
+ [ "${TTYPE}" = "l" ] && {
+ [ -e "${TNAME}" ] && {
+ echo "Cannot create link over existing -${TNAME}-." >&2
+ } || {
+ TSOURCE=`echo ${LINE} | cut -d " " -f 6`
+ [ "${VERBOSE}" != "no" ] && echo "Creating link -${TNAME}- pointing to -${TSOURCE}-."
+ ln -s "${TSOURCE}" "${TNAME}"
+ }
+ continue
+ }
+
+ [ -L "${TNAME}" ] && {
+ [ "${VERBOSE}" != "no" ] && echo "Found link."
+ NEWNAME=`ls -l "${TNAME}" | sed -e 's/^.*-> \(.*\)$/\1/'`
+ echo ${NEWNAME} | grep -v "^/" >/dev/null && {
+ TNAME="`echo ${TNAME} | sed -e 's@\(.*\)/.*@\1@'`/${NEWNAME}"
+ [ "${VERBOSE}" != "no" ] && echo "Converted relative linktarget to absolute path -${TNAME}-."
+ } || {
+ TNAME="${NEWNAME}"
+ [ "${VERBOSE}" != "no" ] && echo "Using absolute link target -${TNAME}-."
+ }
+ }
+
+ [ -e "${TNAME}" ] && {
+ [ "${VERBOSE}" != "no" ] && echo "Target already exists. Skipping."
+ continue
+ }
+
+ case "${TTYPE}" in
+ "f") [ "${VERBOSE}" != "no" ] && echo "Creating file -${TNAME}-."
+ touch "${TNAME}"
+ ;;
+ "d") [ "${VERBOSE}" != "no" ] && echo "Creating directory -${TNAME}-."
+ mkdir -p "${TNAME}"
+ # Add check to see if there's an entry in fstab to mount.
+ ;;
+ *) [ "${VERBOSE}" != "no" ] && echo "Invalid type -${TTYPE}-."
+ continue
+ ;;
+ esac
+
+ chown ${TUSER} ${TNAME} || echo "Failed to set owner -${TUSER}- for -${TNAME}-." >&2
+ chgrp ${TGROUP} ${TNAME} || echo "Failed to set group -${TGROUP}- for -${TNAME}-." >&2
+ chmod ${TMODE} ${TNAME} || echo "Failed to set mode -${TMODE}- for -${TNAME}-." >&2
+
+ done
+
+ return 0
+
+ }
+
+for file in `ls -1 "${CFGDIR}" | sort`; do
+ apply_cfgfile "${CFGDIR}/${file}"
done
diff --git a/packages/initscripts/initscripts-1.0/volatiles b/packages/initscripts/initscripts-1.0/volatiles
index 45d373cedc..37ce8b529a 100644
--- a/packages/initscripts/initscripts-1.0/volatiles
+++ b/packages/initscripts/initscripts-1.0/volatiles
@@ -12,10 +12,20 @@
# l root root 0777 /var/test /tmp/testfile
# f root root 0644 /var/test
#
+# 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 0775 /var
d root root 0755 /var/backups
d root root 0755 /var/cache
d root root 0755 /var/lib
+d root root 0755 /var/lib/ipkg
d root root 0755 /var/lib/misc
d root root 2775 /var/local
d root root 1777 /var/lock