[Initng-svn] r2749 - in initng: . initfiles/daemon initfiles/system
plugins/find
svn at initng.thinktux.net
svn at initng.thinktux.net
Sun Jan 8 14:55:42 CET 2006
Author: deac
Date: Sun Jan 8 14:55:41 2006
New Revision: 2749
Added:
initng/initfiles/system/udevd.ii
Modified:
initng/gen_system_runlevel
initng/initfiles/daemon/fetchmail.ii
initng/initfiles/daemon/gdm.ii
initng/initfiles/daemon/gpm.ii
initng/initfiles/system/anacron.ii
initng/initfiles/system/initial.ii
initng/plugins/find/initng_find.c
Log:
some changes and big changes: udevd.ii added and removed this from initial.ii. this change is untested, please test it!
Modified: initng/gen_system_runlevel
==============================================================================
--- initng/gen_system_runlevel (original)
+++ initng/gen_system_runlevel Sun Jan 8 14:55:41 2006
@@ -68,7 +68,9 @@
gen_system() {
-echo "system/initial
+echo <<END_OF_SYSTEM > ${DESTDIR}/etc/initng/system.runlevel
+system/udevd/filldev
+system/initial
system/mountroot
system/mountfs
system/bootmisc
@@ -81,7 +83,8 @@
system/urandom
system/usb
system/swap
-net/lo" > ${DESTDIR}/etc/initng/system.runlevel
+net/lo
+END_OF_SYSTEM
if [ -f /etc/fedora-release ]; then
echo "system/audit" >> ${DESTDIR}/etc/initng/system.runlevel
Modified: initng/initfiles/daemon/fetchmail.ii
==============================================================================
--- initng/initfiles/daemon/fetchmail.ii (original)
+++ initng/initfiles/daemon/fetchmail.ii Sun Jan 8 14:55:41 2006
@@ -1,6 +1,5 @@
daemon daemon/fetchmail {
need = system/bootmisc daemon/sendmail;
require_network;
- exec_path daemon = @/usr/bin/fetchmail@;
- exec_args daemon = -f /etc/fetchmailrc;
+ exec daemon = @/usr/bin/fetchmail@ -f /etc/fetchmailrc;
}
Modified: initng/initfiles/daemon/gdm.ii
==============================================================================
--- initng/initfiles/daemon/gdm.ii (original)
+++ initng/initfiles/daemon/gdm.ii Sun Jan 8 14:55:41 2006
@@ -10,8 +10,8 @@
env_file = /etc/default/gdm;
# Latest gdm lives in /usr/sbin - temporary workaround
exec_path daemon = /usr/bin/gdm /usr/sbin/gdm;
+ exec_args start = -nodaemon;
#elsed
- exec_path daemon = @/usr/sbin/gdm@ ;
+ exec daemon = @/usr/sbin/gdm@ -nodaemon;
#endd
- exec_args start = -nodaemon;
}
Modified: initng/initfiles/daemon/gpm.ii
==============================================================================
--- initng/initfiles/daemon/gpm.ii (original)
+++ initng/initfiles/daemon/gpm.ii Sun Jan 8 14:55:41 2006
@@ -14,7 +14,7 @@
[ -n "${repeat_type}" -a "${repeat_type}" != "none" ] && append="-R${repeat_type} ${append}"
# If both the second device and type are specified, use it.
[ -n "${device2}" -a -n "${type2}" ] && append="-M -m ${device2} -t ${type2} ${append}"
- /usr/sbin/gpm -m "${device}" -t "${type}" ${append} -D
+ exec @/usr/sbin/gpm@ -m "${device}" -t "${type}" ${append} -D
};
#elsed
env MOUSE=imps2;
Modified: initng/initfiles/system/anacron.ii
==============================================================================
--- initng/initfiles/system/anacron.ii (original)
+++ initng/initfiles/system/anacron.ii Sun Jan 8 14:55:41 2006
@@ -1,5 +1,4 @@
service system/anacron {
- need = system/initial system/clock system/mountfs;
- exec_path start = @/usr/sbin/anacron@;
- exec_args start = -s -d;
+ need = system/bootmisc;
+ exec start = @/usr/sbin/anacron@ -s -d;
}
Modified: initng/initfiles/system/initial.ii
==============================================================================
--- initng/initfiles/system/initial.ii (original)
+++ initng/initfiles/system/initial.ii Sun Jan 8 14:55:41 2006
@@ -1,4 +1,3 @@
-
# This one shud be run first, and have no dependencys.
# Its purpose is to mount /proc /dev and /sys.
service system/initial/mountvirtfs {
@@ -11,13 +10,13 @@
then
echo "The dir \"${dir}\" is missing, cant mount it!" >&2
echo "Please sulogin, remount rw and create them." >&2
- exit 1 # we can't work. critical!
+ exit 1 # It can't work. Critical!
fi
done
mount -n -t proc proc /proc &
mount -n -t sysfs sys /sys &
- # we need /dev/null direct, so we create it by hand.
+ # We need /dev/null direct, so it create it by hand.
{ mount -n -o size=10M,mode=0755 -t tmpfs udev /dev && \
@rm@ -f /dev/null && \
@mknod@ /dev/null c 1 3 -m 666
@@ -28,97 +27,23 @@
};
}
-# This service is responsible for
-# filling the newly moutned /dev with devices
-# Warning, it depends on udevd to run, or no hotplug request
-# can succeed.
+# This service is responsible for filling the newly moutned /dev with devices
+# Warning, it depends on udevd to run, or no hotplug request can succeed.
service system/initial/filldev {
- need = system/initial/mountvirtfs system/initial/udevd;
+ need = system/initial/mountvirtfs;
+ # if somebody want to use udevd, then he set it in runlevel.
+ # if not, he don't set. so it's possible to use devfs.
+ use = system/udevd/filldev;
critical; # this script can't be fail.
script start = {
- # which system needs this?
- if [ -e /etc/udev/links.conf ]
- then
- echo "Parsing /etc/udev/links.conf ..."
- @grep@ '^[^#]' /etc/udev/links.conf | \
- while read type name arg1
- do
- [ "${type}" -a "${name}" -a ! -e "/dev/${name}" -a ! -L "/dev/${name}" ] || continue
- case "${type}" in
- L) @ln@ -snf ${arg1} /dev/${name} & ;;
- D) @mkdir@ -p /dev/${name} ;;
- M) @mknod@ --mode=600 /dev/${name} ${arg1} &;;
- *) echo "links.conf: unparseable line (${type} ${name} ${arg1})" ;;
- esac
- done
- fi
-
- # and this?
- # A complete dir to copy
- if [ -d /lib/udev/devices ]
- then
- echo "Creating /dev from /lib/udev/devices ..."
- # Copy over default device tree
- (cd /lib/udev/devices && @find@ -print0 | @cpio@ --quiet -0pmdu /dev) &
- fi
-
- # and this?
- # If no-one abow work
- if [ ! -e /etc/udev/links.conf -a ! -d /lib/udev/devices ]
- then
- # Some manually, youst to be sure.
- @ln@ -snf /proc/self/fd /dev/fd &
- @ln@ -snf fd/0 /dev/stdin &
- @ln@ -snf fd/1 /dev/stdout &
- @ln@ -snf fd/2 /dev/stderr &
- @ln@ -snf /proc/kcore /dev/core &
- @ln@ -snf /proc/asound/oss/sndstat /dev/sndstat &
- fi
-
- # which system provides udevsynthesize? gentoo does not.
- # and which provides udevplug? gentoo does not, too.
-
- # run syntesizers that will make hotplug events for every
- # devices that is currently in the computer, that will
- # create all dev files.
- if [ -x "@/sbin/udevsynthesize@" ]
- then
- udevd_timeout=60
- echo "Running @/sbin/udevsynthesize@ to populate /dev ..."
- @mkdir@ -p /dev/.udev/db/
- @mkdir@ -p /dev/.udev/queue/
- @mkdir@ -p /dev/.udevdb/
-
- @/sbin/udevsynthesize@
-
- # wait for the udevd childs to finish
- echo "Waiting for /dev to be fully populated ..."
- while [[ -d /dev/.udev/queue/ && "${udevd_timeout}" -ne 0 ]]
- do
- sleep 0.2
- udevd_timeout=`@expr@ ${udevd_timeout} - 1`
- done
- elif [ -x "@/sbin/udevplug@" ]
- then
- @/sbin/udevplug@
- elif [ -x "@/sbin/udevstart@" ]
- then
- @/sbin/udevstart@
-#ifd pingwinek
- # this require kernel 2.6.15
- # synthesize only selected uevents after udevstart for better performance
- for i in /sys/bus/*/devices/*/uevent
- do
- echo "add" > "$i"
- done
-#endd
- fi
echo "Mounting devpts at /dev/pts ..."
@mkdir@ -p /dev/pts && @mount@ -n -t devpts -o gid=5,mode=0620 none /dev/pts &
echo "Mounting devshm at /dev/shm ..."
@mkdir@ -p /dev/shm && @mount@ -n -t tmpfs none /dev/shm &
+ # who needs this? only user, who needs this.
+ # so i think, we should make this link, if somebody needs this.
[ ! -e /dev/MAKEDEV -a @/sbin/MAKEDEV@ ] && \
@ln@ -fs @/sbin/MAKEDEV@ /dev/MAKEDEV &
@@ -127,40 +52,6 @@
};
}
-
-# udevd to handle udev requests
-daemon system/initial/udevd {
- # first we must run udevstart or something like, because, it will kill our udevd.
- # btw: we kill all udevd, which runs before.
- # Deac, THIS SERVICE CANT, be depending on system/initial/udev/start, becouse all udev tools
- # like udevplug, and udevstart needs udevd to be running, to work.
- need = system/initial/mountvirtfs;
- respawn;
- pid_of = udevd;
- critical;
- script daemon = {
- # Make sure hotplug is not missing.
- # and what is, if we know it?
- [ -e /proc/sys/kernel/hotplug ] || echo "/proc/sys/kernel/hotplug is missing!"
-
- # we kill it, because udevd can run only once
- # system/initial/udev/start starts udevd too, so we must kill it.
- @killall@ udevd >/dev/null 2>&1
-
- # Setup hotplugging (if possible)
- echo "@/sbin/udevsend:/sbin/hotplug:/sbin/udev@" >/proc/sys/kernel/hotplug
-
- # Launch udevd
- exec @/sbin/udevd@ --daemon;
- }
-
- script stop = {
- # every new hotplug-event can do something wrong.
- echo "" >/proc/sys/kernel/hotplug
- };
-}
-
-
service system/initial/loglevel {
# Set the console loglevel to 1 for a cleaner boot
# the logger should anyhow dump the ring-0 buffer at start to the
@@ -171,6 +62,6 @@
}
virtual system/initial {
- need = system/initial/loglevel system/initial/mountvirtfs system/initial/udevd system/initial/filldev;
+ need = system/initial/loglevel system/initial/mountvirtfs system/initial/filldev;
use = system/selinux/dev;
}
Modified: initng/plugins/find/initng_find.c
==============================================================================
--- initng/plugins/find/initng_find.c (original)
+++ initng/plugins/find/initng_find.c Sun Jan 8 14:55:41 2006
@@ -120,7 +120,7 @@
return (NULL);
}
-#define ALIAS_FILE "/etc/initng/service_alias"
+#define ALIAS_FILE plugindir "/service_alias"
static char *get_find_alias(const char *from)
{
int from_len = 0;
More information about the Initng-svn
mailing list