(2007-04-11) Kable-distro

This commit is contained in:
2007-04-11 00:00:00 +02:00
commit 85f73f180f
548 changed files with 51134 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
id:2:initdefault:
si:S:sysinit:/etc/rc.d/rc.sysinit
l0:0:wait:/etc/rc.d/rc.0
l1:1:wait:/etc/rc.d/rc.1
l2:2:wait:/etc/rc.d/rc.2
l3:3:wait:/etc/rc.d/rc.3
l4:4:wait:/etc/rc.d/rc.4
l5:5:wait:/etc/rc.d/rc.5
l6:6:wait:/etc/rc.d/rc.6
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -r now
su:S1:respawn:/sbin/sulogin
c1:2345:respawn:/sbin/agetty tty1 38400 linux
c2:2345:respawn:/sbin/agetty tty2 38400 linux
c3:2345:respawn:/sbin/agetty tty3 38400 linux
c4:2345:respawn:/sbin/agetty tty4 38400 linux
c5:2345:respawn:/sbin/agetty tty5 38400 linux
c6:2345:respawn:/sbin/agetty tty6 38400 linux

View File

@@ -0,0 +1,36 @@
#!/bin/sh
# Environmental setup
umask 022
export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
# Color definitions
NORMAL="\\033[0;39m"
GREEN="\\033[1;32m"
YELLOW="\\033[1;33m"
RED="\\033[1;31m"
CYAN="\\033[1;36m"
BLUE="\\033[1;34m"
msg_red()
{
echo -e "${RED}${1}${NORMAL}"
}
msg_green()
{
echo -e "${GREEN}${1}${NORMAL}"
}
msg_blue()
{
echo -e "${BLUE}${1}${NORMAL}"
}
msg_yellow()
{
echo -e "${YELLOW}${1}${NORMAL}"
}
msg_cyan()
{
echo -e "${CYAN}${1}${NORMAL}"
}

View File

@@ -0,0 +1,70 @@
#!/bin/sh
#########################################
######## HALT or REBOOT #################
#########################################
#import functions
. /etc/rc.d/functions
msg_green "Sending all processes the TERM signal..."
/sbin/killall5 -15
sleep 1
msg_green "Sending all processes the KILL signal..."
/sbin/killall5 -9
sleep 1
msg_green "Deactivating swap partitions..."
/sbin/swapoff -a
msg_green "Saving random seed to a temporary file..."
/bin/dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2>/dev/null
msg_green "Saving mixer settings..."
/usr/sbin/alsactl store
msg_green "Saving the system time to hardware clock..."
# For UTC
#/sbin/hwclock --systohc --utc
# For localtime
/sbin/hwclock --systohc --localtime
case "$0" in
*6)
/sbin/reboot -w
;;
*0)
/sbin/halt -w
;;
esac
msg_green "Flushing filesystem buffers..."
/bin/sync
msg_green "Remounting root filesystem read-only..."
/bin/mount -n -o remount,ro /
msg_green "Unmounting local filesystems..."
/bin/umount -a -tnonfs
case "$0" in
*6)
msg_green "Please stand by while rebooting..."
/sbin/reboot -d -f -i
;;
*0)
msg_green "Bye..."
/sbin/halt -d -f -p
;;
esac

View File

@@ -0,0 +1,23 @@
#!/bin/sh
#########################################
######## SINGLE USER ####################
#########################################
#import functions
. /etc/rc.d/functions
msg_green "Sending all processes the TERM signal..."
/sbin/killall5 -15
sleep 1
msg_green "Sending all processes the KILL signal..."
/sbin/killall5 -9
# inittab takes care of the rest

View File

@@ -0,0 +1,27 @@
#!/bin/sh
#import functions
. /etc/rc.d/functions
#echo 1 > /proc/sys/net/ipv4/ip_forward # enable IP forwarding
#echo 1 > /proc/sys/net/ipv4/tcp_syncookies # defend against SYN flood
msg_green "Setting up loopback networking..."
ifconfig lo 127.0.0.1 netmask 255.0.0.0
msg_green "Setting up eth0 "
ifconfig eth0 192.168.1.20 netmask 255.255.255.0
#msg_green "Setting up eth1 "
#ifconfig eth1 192.168.0.20 netmask 255.255.255.0
msg_green "Setting default route"
#ip route add default via 192.168.0.1 scope link metric 1 dev eth0
route add default gw 192.168.1.1
if [ -x /etc/rc.d/rc.local ]; then
/etc/rc.d/rc.local
fi

View File

@@ -0,0 +1 @@
../../../../../../media/hdc1/Kable-distro/bsd-bootscripts/etc/rc.d/rc.2

View File

@@ -0,0 +1 @@
../../../../../../media/hdc1/Kable-distro/bsd-bootscripts/etc/rc.d/rc.2

View File

@@ -0,0 +1,8 @@
#!/bin/sh
#import functions
. /etc/rc.d/functions
if [ -x /etc/rc.d/rc.local ]; then
/etc/rc.d/rc.local
fi

View File

@@ -0,0 +1 @@
../../../../../../media/hdc1/Kable-distro/bsd-bootscripts/etc/rc.d/rc.0

View File

@@ -0,0 +1,6 @@
#!/bin/sh
#import functions
. /etc/rc.d/functions

View File

@@ -0,0 +1,5 @@
#!/bin/sh
#import functions
. /etc/rc.d/functions

View File

@@ -0,0 +1,132 @@
#!/bin/sh
####################################
####### SYSINIT ####################
####################################
#import functions
. /etc/rc.d/functions
msg_green "Remounting root device read-write..."
/bin/mount -n -v -o remount,rw /
msg_green "Mounting kernel-based file systems..."
mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
mount -n -t tmpfs tmpfs /dev -o mode=755
mkdir /dev/pts
mkdir /dev/shm
mount -n -t devpts devpts /dev/pts -o gid=4,mode=620
mount -n -t tmpfs tmpfs /dev/shm
msg_green "Starting UDEV..."
# Avoid other binarys reciving kernel events
echo > /proc/sys/kernel/hotplug
# Copy static device nodes to /dev
cp -a /lib/udev/devices/* /dev
/sbin/udevd --daemon
/sbin/udevtrigger
/sbin/udevsettle
msg_green "Setting HD params"
hdparm -d1 -c1 -u1 -m16 /dev/hda
msg_green "Starting system and kernel log daemons...."
/usr/sbin/syslogd
/usr/sbin/klogd -c3
msg_green "Initializing swap partitions..."
/sbin/swapon -a
# Creaning mtab
echo "" >/etc/mtab
/bin/mount -f -o remount,rw /
msg_green "Mounting other local filesystems..."
/bin/mount -a -v -tnonfs
msg_green "Setting up hostname..."
/bin/hostname `cat /etc/hostname |cut -d . -f1`
if [ -f "/etc/random-seed" ]; then
msg_green "Initializing random number generator..."
/bin/cat /etc/random-seed >/dev/urandom
rm -f /etc/random-seed
fi
msg_green "restoring mixer settings..."
/usr/sbin/alsactl restore
# removing stale PID files is good, too
msg_green "Removing stale PID files..."
/bin/rm /var/run/*.pid &> /dev/null
/bin/rm /etc/dhcpc/*.pid &> /dev/null
msg_green "Loading keymap..."
/bin/loadkeys es &> /dev/null
msg_green "Setting console font..."
/usr/bin/setfont lat9u-12.psfu.g
msg_green "Setting keyboard rate (30) and delay (250)..."
/usr/bin/kbdrate -r 30 -d 250
msg_green "Setting up Mouse(gpm)..."
gpm -m /dev/input/mice -t imps2
### mplayer likes this...
msg_green "Configuring RTC..."
echo 1024 > /proc/sys/dev/rtc/max-user-freq
msg_green "Setting system time from hardware clock..."
# For UTC
#/sbin/hwclock --hctosys --utc
# For Localtime
/sbin/hwclock --hctosys --localtime
### Use modules? If yes, uncomment this:
# echo "Updating module dependencies..."
# /sbin/depmod -a
# Load Modules
if [ -f "/etc/modules" ]; then
msg_green "Loading modules..."
for i in $(cat /etc/modules)
do
modprobe $i
done
fi
### You may find this useful when you have some (non-networking) daemons
### and an extra .rc-file for them:
if [ -x /etc/rc.d/rc.daemons ]; then
/etc/rc.d/rc.daemons
fi