Browse Source

clifford & fake:


			
			
				rocklinux
			
			
		
Clifford Wolf 20 years ago
parent
commit
2b526d5251
13 changed files with 254 additions and 133 deletions
  1. +3
    -0
      package/base/devfsd/devfsd.init
  2. +0
    -35
      package/base/hotplug/config.in
  3. +3
    -2
      package/base/hotplug/hotplug.desc
  4. +10
    -11
      package/base/hotplug/hotplug.init
  5. +11
    -0
      package/base/rockplug/stonemod.patch
  6. +1
    -2
      package/base/sysfiles/etc_conf_hardware.txt
  7. +48
    -4
      package/base/sysfiles/etc_initscript.txt
  8. +35
    -18
      package/base/sysfiles/stone_mod_hardware.sh
  9. +48
    -16
      package/base/sysfiles/system.init
  10. +0
    -41
      package/base/udev/config.in
  11. +11
    -2
      package/base/udev/udev.conf
  12. +2
    -2
      package/base/udev/udev.desc
  13. +82
    -0
      package/base/udev/udev.permissions

+ 3
- 0
package/base/devfsd/devfsd.init

@ -26,6 +26,9 @@
# Runlevel: 13 rcX rc2 rc3 rc4 rc5
#
# if /dev isn't devfs, exit shyly
[ ! -e /dev/.devfsd ] && exit 0
main_begin
block_begin(start, `Starting devfsd.')

+ 0
- 35
package/base/hotplug/config.in

@ -1,35 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/hotplug/config.in
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck rockplug X ; then
menu_begin MENU_PKG_HOTPLUG 'Hotplug Options'
bool 'Use the original hotplug version by Greg K-H' \
ROCKCFG_PKG_HOTPLUG 0
if [ "$ROCKCFG_PKG_HOTPLUG" = 1 ] ; then
pkgremove rockplug
else
pkgremove hotplug
fi
menu_end
fi

+ 3
- 2
package/base/hotplug/hotplug.desc

@ -33,10 +33,11 @@
[M] Juergen "George" Sawinski <jsaw@rocklinux.org>
[C] base/system base/kernel
[F] CORE
[L] GPL
[S] Beta
[V] 2004_01_05
[V] 2004_09_23
[P] X -?-3-----9 187.400
[D] 175861095 hotplug-2004_01_05.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
[D] 2569029812 hotplug-2004_09_23.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/

+ 10
- 11
package/base/hotplug/hotplug.init

@ -23,24 +23,23 @@
# --- ROCK-COPYRIGHT-NOTE-END ---
#
# Desc: User space part of the Linux Kernel hotplug support.
# Runlevel: 13 rcX rc2 rc3 rc4 rc5
# Runlevel: 13 rcX
#
main_begin
block_begin(start, `Starting hotplug.')
for RC in /etc/hotplug/*.rc
do
block_begin(start, `Configuring hardware by activating hotplug.')
for RC in /etc/hotplug/*.rc; do
echo -n "[$( basename ${RC%.rc} )] "
check(`$RC start')
[[ $error = 0 ]] || break
done
[[ $error = 0 ]] && touch /var/lock/subsys/hotplug
done; echo
touch /var/lock/subsys/hotplug
block_end
block_begin(stop, `Stopping hotplug.')
for RC in /etc/hotplug/*.rc
do
block_begin(stop, `Unconfiguring hardware by de-activating hotplug.')
for RC in /etc/hotplug/*.rc; do
echo -n "[$( basename ${RC%.rc} )] "
check(`$RC stop')
done
done; echo
rm -f /var/lock/subsys/hotplug
block_end
main_end

+ 11
- 0
package/base/rockplug/stonemod.patch

@ -0,0 +1,11 @@
--- ./etc/stone.d/mod_rockplug.sh.orig 2004-12-24 00:33:47.647396336 +0100
+++ ./etc/stone.d/mod_rockplug.sh 2004-12-24 00:34:24.846741176 +0100
@@ -19,8 +19,6 @@
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
-#
-# [MAIN] 20 rockplug ROCK-Plug/Drivers Configuration
######################################################################
# DEFAULT CONFIG GENERATION

+ 1
- 2
package/base/sysfiles/etc_conf_hardware.txt

@ -1,2 +1 @@
HARDWARE_SETUP=rockplug
HARDWARE_SETUP=hotplug

+ 48
- 4
package/base/sysfiles/etc_initscript.txt

@ -27,12 +27,56 @@ ulimit -c 2097151
PATH=/bin:/sbin:/usr/bin:/usr/sbin
export PATH
# Make sure we have a /dev/console
# Do the dev filesystem magic
#
if ! [ -e /dev/.devfsd ] ; then
mount -v -n -t devfs none /dev
echo "Mounted /dev (devfs) from /etc/initscript." > /dev/console
if [ -z "$devtype" ]; then
devtype=devfs
if [ -f /etc/conf/devtype ]; then
. /etc/conf/devtype
fi
fi
case "$devtype" in
devfs)
if ! [ -e /dev/.devfsd ] ; then
mount -v -n -t devfs none /dev
exec > /dev/console 2>&1 < /dev/console
echo "Mounted /dev (devfs) from /etc/initscript."
fi
;;
udev)
if ! [ -e /dev/.udevdb ] ; then
if [ -e /dev/.devfsd ]; then
mount --move /dev /etc/udev
mount -t ramfs none /dev
mkdir /dev/devfs
mount --move /etc/udev /dev/devfs
else
mount -t ramfs none /dev
fi
mount -n /sys; mount -n /proc
mkdir -p /dev/pts /dev/shm
/sbin/udevstart
exec > /dev/console 2>&1 < /dev/console
echo "Mounted /dev (udev) from /etc/initscript."
fi
;;
static)
if ! [ -e /dev/.devfsd ] ; then
umount -l -n /dev
echo "Umounted /dev (devfs) from /etc/initscript."
fi
;;
*)
if ! [ -e /dev/console ]; then
mount -t ramfs none /dev
mknod -m 600 /dev/console c 5 1
fi
exec > /dev/console 2>&1 < /dev/console
echo "Unrecognized devtype=$devtype option caught in /etc/initscript."
;;
esac
unset devtype
# Execute the program.
#

+ 35
- 18
package/base/sysfiles/stone_mod_hardware.sh

@ -22,6 +22,10 @@
#
# [MAIN] 20 hardware Kernel Drivers and Hardware Configuration
set_dev_setup() {
echo "devtype=$1" > /etc/conf/devtype
}
set_hw_setup() {
echo "HARDWARE_SETUP=$1" > /etc/conf/hardware
}
@ -98,17 +102,15 @@ set_rtc() {
main() {
while
HARDWARE_SETUP=rockplug
devtype=devfs
if [ -f /etc/conf/devtype ]; then
. /etc/conf/devtype
fi
HARDWARE_SETUP=hotplug
if [ -f /etc/conf/hardware ]; then
. /etc/conf/hardware
fi
for x in hwscan rockplug; do
if [ "$HARDWARE_SETUP" = $x ]; then
eval "hw_$x='<*>'"
else
eval "hw_$x='< >'"
fi
done
clock_tz=utc
clock_rtc="`cat /proc/sys/dev/rtc/max-user-freq 2> /dev/null`"
@ -117,28 +119,43 @@ main() {
fi
cmd="gui_menu hw 'Kernel Drivers and Hardware Configuration'"
for x in devfs udev static; do
if [ "$devtype" = $x ]; then
cmd="$cmd \"<*> Use $x /dev filesystem.\""
else
cmd="$cmd \"< > Use $x /dev filesystem.\""
fi
cmd="$cmd \"set_dev_setup $x\"";
done
cmd="$cmd '' ''";
for x in hwscan hotplug rockplug; do
[ -x /sbin/$x ] || continue
if [ "$HARDWARE_SETUP" = $x ]; then
cmd="$cmd \"<*> Use $x to configure hardware.\""
else
cmd="$cmd \"< > Use $x to configure hardware.\""
fi
cmd="$cmd \"set_hw_setup $x\"";
done
cmd="$cmd '' ''";
if [ "$HARDWARE_SETUP" = rockplug ]; then
cmd="$cmd \"$hw_rockplug Use ROCKPLUG to configure hardware.\""
cmd="$cmd \"set_hw_setup rockplug\"";
cmd="$cmd \"$hw_hwscan Use hwscan to configure hardware.\""
cmd="$cmd \"set_hw_setup hwscan\"";
cmd="$cmd \"\" \"\"";
cmd="$cmd 'Edit/View PCI configuration'";
cmd="$cmd \"gui_edit PCI /etc/conf/pci\""
cmd="$cmd 'Edit/View USB configuration'";
cmd="$cmd \"gui_edit USB /etc/conf/usb\""
cmd="$cmd \"\" \"\"";
cmd="$cmd '' ''";
#@FIXME single shot menu?
cmd="$cmd 'ROCK-Plug/Drivers Configuration'"
cmd="$cmd 'stone rockplug' '' ''"
cmd="$cmd 'Re-create initrd image (mkinitrd, `uname -r`)'"
cmd="$cmd 'gui_cmd mkinitrd mkinitrd' '' ''"
fi
if [ "$HARDWARE_SETUP" = hwscan ]; then
cmd="$cmd \"$hw_rockplug Use ROCKPLUG to configure hardware.\" \"set_hw_setup rockplug\"";
cmd="$cmd \"$hw_hwscan Use hwscan to configure hardware.\" \"set_hw_setup hwscan\"";
cmd="$cmd \"\" \"\"";
cmd="$cmd 'Edit /etc/conf/kernel (kernel drivers config file)'"
cmd="$cmd \"gui_edit 'Kernel Drivers Config File' /etc/conf/kernel\""
cmd="$cmd 'Re-create initrd image (mkinitrd, `uname -r`)'"

+ 48
- 16
package/base/sysfiles/system.init

@ -27,10 +27,9 @@
#
main_begin
block_begin(start, `Mounting /dev, /proc, /sys and /dev/shm.')
check(`[ -e /dev/.devfsd ] || mount -n /dev')
check(`mount -n /proc')
mount -n /sys 2> /dev/null
block_begin(start, `Mounting /proc, /sys, /dev/shm and /dev/pts.')
mount -n /proc 2> /dev/null
mount -n /sys 2> /dev/null
check(`mount -n /dev/shm')
mount -n /dev/pts 2> /dev/null
dnl
@ -71,21 +70,44 @@ dnl
dnl
block_split(`Mounting local file systems.')
check(`mount -n -o remount,rw /')
rootdev="/dev/$(ls -l /dev/root | sed 's,.* -> ,,')"
rootdev="/dev/$(ls -l /dev/root 2> /dev/null | sed 's,.* -> ,,')"
if [ "$rootdev" = "/dev/" ]; then
rootdev="$( sed 's, ,\n,g' < /proc/cmdline | \
grep ^root= | cut -f2- -d= )"
[ -z "$rootdev" ] && rootdev="/dev/root"
fi
check(`grep -v "^rootfs " /proc/mounts | \
sed "s,^/dev/root ,$rootdev ," > /etc/mtab')
check(`mount -a -t nocoda,nfs,devfs,proc,sysfs')
dnl
if [ "$HARDWARE_SETUP" = rockplug ]; then
block_split(`Refresh utmp, delete lock and tmp files and other stuff.')
find /var/lock /var/run /tmp -mindepth 1 -print0 2> /dev/null | xargs --null rm -rf
rm -f /etc/nologin /nologin /fastboot ; touch /var/run/utmp
chmod 664 /var/run/utmp ; chown root:tty /var/run/utmp
mkdir /tmp/.ICE-unix /var/lock/subsys
chmod 1777 /tmp/.ICE-unix
dnl
case "$HARDWARE_SETUP" in
rockplug)
block_split(`Configuring hardware by activating rockplug.')
echo "/sbin/rockplug" > /proc/sys/kernel/hotplug
for file in /etc/rockplug/*.init ; do
for file in /etc/rockplug/*.init; do
[ -f $file ] && $file start
done
else
;;
hotplug)
block_split(`Configuring hardware by activating hotplug.')
echo "/sbin/hotplug" > /proc/sys/kernel/hotplug
for RC in /etc/hotplug/*.rc; do
echo -n "[$( basename ${RC%.rc} )] "
check(`$RC start');
done; echo
touch /var/lock/subsys/hotplug
;;
*)
block_split(`Loading kernel modules and configuring the kernel.')
check(`sh /etc/conf/kernel')
fi
esac
dnl
[ -f /etc/conf/clock ] && . /etc/conf/clock
if [ "$clock_tz" = localtime ] ; then
@ -103,13 +125,6 @@ dnl
dnl
block_split(`Setting hostname to $(cat /etc/HOSTNAME).')
check(`hostname "$(cat /etc/HOSTNAME)"')
dnl
block_split(`Refresh utmp, delete lock and tmp files and other stuff.')
find /var/lock /var/run /tmp -mindepth 1 -print0 2> /dev/null | xargs --null rm -rf
rm -f /etc/nologin /nologin /fastboot ; touch /var/run/utmp
chmod 664 /var/run/utmp ; chown root:tty /var/run/utmp
mkdir /tmp/.ICE-unix
chmod 1777 /tmp/.ICE-unix
dnl
block_split(`Writing /var/log/boot.msg.')
check(`dmesg > /var/log/boot.msg')
@ -172,6 +187,23 @@ dnl
else check(`reboot -w') ; fi
block_split(`Saving kernel random seed.')
dd if=/dev/urandom of=/var/state/random-seed count=1 2> /dev/null
dnl
case "$HARDWARE_SETUP" in
rockplug)
block_split(`Unconfiguring hardware by de-activating rockplug.')
for file in /etc/rockplug/*.init; do
[ -f $file ] && $file stop
done
;;
hotplug)
block_split(`Unconfiguring hardware by de-activating hotplug.')
for RC in /etc/hotplug/*.rc; do
echo -n "[$( basename ${RC%.rc} )] "
check(`$RC stop');
done; echo
rm -f /var/lock/subsys/hotplug
;;
esac
dnl
block_split(`Sending all processes a SIGTERM (15).')
check(`killall5 -15') ; sleep 5

+ 0
- 41
package/base/udev/config.in

@ -1,41 +0,0 @@
# --- ROCK-COPYRIGHT-NOTE-BEGIN ---
#
# This copyright note is auto-generated by ./scripts/Create-CopyPatch.
# Please add additional copyright information _after_ the line containing
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
#
# ROCK Linux: rock-src/package/base/udev/config.in
# ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. A copy of the GNU General Public
# License can be found at Documentation/COPYING.
#
# Many people helped and are helping developing ROCK Linux. Please
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM
# file for details.
#
# --- ROCK-COPYRIGHT-NOTE-END ---
if pkgcheck udev X ; then
if ! pkgcheck linux=linux26 X ; then
comment '--- udev disabled because no 2.6 kernel will be built' ;
pkgremove udev ;
elif ! pkgcheck hotplug X ; then
comment '--- udev disabled because hotplug will not be built' ;
pkgremove udev ;
else
menu_begin MENU_PKG_UDEV 'udev Options'
text 'udev dev-directory' \
ROCKCFG_PKG_UDEV_DEVDIR '/udev' ;
if [ "$ROCKCFG_PKG_UDEV_DEVDIR" == "/dev" ] ; then
comment '--- /dev ?? you sure are brave ! ---' ;
fi
menu_end
fi
fi

+ 11
- 2
package/base/udev/udev.conf

@ -20,5 +20,14 @@
#
# --- ROCK-COPYRIGHT-NOTE-END ---
makeopt="prefix=$root udevdir=$root/$ROCKCFG_PKG_UDEV_DEVDIR"
makeinstopt="prefix=$root udevdir=$root/$ROCKCFG_PKG_UDEV_DEVDIR install"
udev_pm() {
mkdir -p $root/etc/udev/scripts
cp etc/udev/debian/devfs.rules $root/etc/udev/rules.d/50-udev.rules
cp extras/{ide-devfs.sh,scsi-devfs.sh,inputdev.sh} $root/etc/udev/scripts/
chmod +x $root/etc/udev/scripts/{ide-devfs.sh,scsi-devfs.sh,inputdev.sh}
cp $confdir/udev.permissions $root/etc/udev/permissions.d/50-udev.permissions
}
makeopt="prefix=$root udevdir=$root/dev"
makeinstopt="prefix=$root udevdir=$root/dev install"
hook_add postmake 1 udev_pm

+ 2
- 2
package/base/udev/udev.desc

@ -42,7 +42,7 @@
[L] GPL
[S] Beta
[V] 022
[V] 050
[P] X -?-3-----9 187.500
[D] 1970863548 udev-022.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/
[D] 1409200580 udev-050.tar.bz2 ftp://ftp.kernel.org/pub/linux/utils/kernel/hotplug/

+ 82
- 0
package/base/udev/udev.permissions

@ -0,0 +1,82 @@
# name:user:group:mode
# character devices
ptmx:root:tty:0666
random:root:root:0666
urandom:root:root:0444
kmem:root:kmem:0640
mem:root:kmem:0640
port:root:kmem:0640
null:root:root:0666
zero:root:root:0666
full:root:root:0666
misc/nvram:root:root:660
nvram:root:root:660
misc/rtc:root:sound:0664
rtc:root:sound:0664
tty:root:tty:0666
snd/*:root:sound:0660
sound/*:root:sound:0660
admmidi*:root:sound:0660
adsp*:root:sound:0660
aload*:root:sound:0660
amidi*:root:sound:0660
amixer*:root:sound:0660
audio*:root:sound:0660
dmfm*:root:sound:0660
dsp*:root:sound:0660
audio*:root:sound:0660
mixer*:root:sound:0660
music:root:sound:0660
sequencer*:root:sound:0660
input/mice:root:root:0600
input/mouse[0-9]*:root:root:0600
input/js[0-9]*:root:root:0644
input/*:root:root:0600
mouse[0-9]*:root:root:0600
js[0-9]*:root:root:0644
nvidia*:root:root:0660
# block devices
floppy/*:root:disk:0660
fd[0-9]*:root:disk:0660
cdemu/*:root:disk:0660
pktcdvd[0-9]*:root:disk:0660
ram[0-9]*:root:disk:0660
raw/*:root:disk:0660
ide/*/cd:root:disk:0660
ide/*:root:disk:0660
hd[a-s]:root:disk:0660
hd[a-s][0-9]*:root:disk:0660
scsi/*/cd:root:disk:0660
scsi/*:root:disk:0660
sd[a-z]:root:disk:0660
sd[a-z][0-9]*:root:disk:0660
sd[a-i][a-z]:root:disk:0660
sd[a-i][a-z][0-9]*:root:disk:0660
s[gr][0-9]*:root:disk:0660
scd[0-9]*:root:disk:0660
dasd[0-9]*:root:disk:0660
ataraid[0-9]*:root:disk:0660
loop/*:root:disk:0660
loop[0-9]*:root:disk:0660
md/*:root:disk:0660
md[0-9]*:root:disk:0660
dm-*:root:disk:0640
sgi_fetchop:root:root:666
iseries/vcd*:root:disk:660
iseries/vd*:root:disk:660

Loading…
Cancel
Save