[Risolto] Bootsplash: progressbar
Moderatore: Staff
Regole del forum
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
1) Citare sempre la versione di Slackware usata, la versione del Kernel e magari anche la versione della libreria coinvolta. Questi dati aiutano le persone che possono rispondere.
2) Per evitare confusione prego inserire in questo forum solo topic che riguardano appunto Gnu/Linux in genere, se l'argomento è specifico alla Slackware usate uno dei forum Slackware o Slackware64.
3) Leggere attentamente le risposte ricevute
4) Scrivere i messaggi con il colore di default, evitare altri colori.
5) Scrivere in Italiano o in Inglese, se possibile grammaticalmente corretto, evitate stili di scrittura poco chiari, quindi nessuna abbreviazione tipo telegramma o scrittura stile SMS o CHAT.
6) Appena registrati è consigliato presentarsi nel forum dedicato.
La non osservanza delle regole porta a provvedimenti di vari tipo da parte dello staff, in particolare la non osservanza della regola 5 porta alla cancellazione del post e alla segnalazione dell'utente. In caso di recidività l'utente rischia il ban temporaneo.
- Absolut
- Linux 4.x

- Messaggi: 1465
- Iscritto il: gio 10 feb 2005, 0:00
- Slackware: current
- Località: Roma
[Risolto] Bootsplash: progressbar
Ho seguito la guida Slacky per il bootsplash.
ho messo lo script bootsplash in rc.d, poi chmod ug+x rc.bootsplash.
Ho modificato rc.S e rc.M aggiungendo all'inizio dei file
/etc/rc.d/rc.bootsplash
animate startup
e di tanto in tanto
progressbar xx indicando le percentuali
ma non funziona!
vi ringrazio!
ho messo lo script bootsplash in rc.d, poi chmod ug+x rc.bootsplash.
Ho modificato rc.S e rc.M aggiungendo all'inizio dei file
/etc/rc.d/rc.bootsplash
animate startup
e di tanto in tanto
progressbar xx indicando le percentuali
ma non funziona!
vi ringrazio!
Ultima modifica di Absolut il sab 13 gen 2007, 12:22, modificato 1 volta in totale.
- l1q1d
- Master

- Messaggi: 1862
- Iscritto il: lun 21 feb 2005, 0:00
- Località: In uno spazio n-dimesionale
- Contatta:
La progress bar del bootsplash è una farsa poichè sei tu che devi settare le percentuali nel file di boot. Mi spiego meglio: Per farla andare devi modificare i file rc.M e mettere in alcuni punti la percentuale che la barra deve mostrare...
Non ricordo esattamente i punti ma penso che con un giro su google troverai la risposta.
Non ricordo esattamente i punti ma penso che con un giro su google troverai la risposta.
- Absolut
- Linux 4.x

- Messaggi: 1465
- Iscritto il: gio 10 feb 2005, 0:00
- Slackware: current
- Località: Roma
cambiato bootsplash. ma nulla.
se volete vi posto i miei rc.M e rc.S
Il mio rc.M
#!/bin/sh
#
# rc.M This file is executed by init(8) when the system is being
# initialized for one of the "multi user" run levels (i.e.
# levels 1 through 6). It usually does mounting of file
# systems et al.
#
# Version: @(#)/etc/rc.d/rc.M 2.23 Wed Feb 26 19:20:58 PST 2003
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Heavily modified by Patrick Volkerding <volkerdi@slackware.com>
#
/etc/rc.d/rc.bootsplash
animate startup
# Tell the viewers what's going to happen.
echo "Going multiuser..."
# Screen blanks after 15 minutes idle time, and powers down in one hour
# if the kernel supports APM or ACPI power management:
/bin/setterm -blank 15 -powersave powerdown -powerdown 60
progressbar 55
# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
/bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
else
# fall back on this old default:
echo "darkstar.example.net" > /etc/HOSTNAME
/bin/hostname darkstar
fi
progressbar 60
# Save the contents of 'dmesg':
/bin/dmesg -s 65536 > /var/log/dmesg
# If we are returning from single-user mode we will need to restart
# udevd on systems that use udev:
if ! ps axc | grep -wq udevd ; then
if grep -wq sysfs /proc/mounts && grep -wq tmpfs /proc/filesystems ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
/bin/sh /etc/rc.d/rc.udev start &
/bin/sh /lib/udev/udev.count_events.sh
fi
fi
fi
fi
progressbar 65
# Start the system logger.
if [ -x /etc/rc.d/rc.syslog -a -x /usr/sbin/syslogd -a -d /var/log ]; then
. /etc/rc.d/rc.syslog start &
fi
# Initialize PCMCIA devices:
#
# NOTE: This used to be started near the top of rc.S so that PCMCIA devices
# could be fsck'ed along with the other drives. This had some unfortunate
# side effects, however, since root isn't yet read-write, and /var might not
# even be mounted the .pid files can't be correctly written in /var/run and
# the pcmcia system can't be correctly shut down. If you want some PCMCIA
# partition to be mounted at boot (or when the card is inserted) then add
# the appropriate lines to /etc/pcmcia/scsi.opts.
#
# Note that the stuff in /etc/pcmcia/ is only for 2.4.x kernels using
# 16-bit PCMCIA cards (not 32-bit Cardbus cards!). For example, with a
# wireless card you might need to set options in /etc/pcmcia OR in
# /etc/rc.d/rc.wireless.conf, or even in /etc/rc.d/rc.inet1.conf (with
# extra options if needed for the encryption key, ESSID, etc.)
#
# Hopefully this situation will be unified in the future, but for now
# that's how it is...
#
#if [ -x /etc/rc.d/rc.pcmcia ]; then
# . /etc/rc.d/rc.pcmcia start
# # The cards might need a little extra time here to initialize.
# if [ -r /var/run/cardmgr.pid ]; then
# sleep 5
# fi
#fi
# Initialize the networking hardware.
if [ -x /etc/rc.d/rc.inet1 ]; then
. /etc/rc.d/rc.inet1
fi
# Initialize the hotplugging subsystem for Cardbus, IEEE1394, PCI, and
# USB devices. On a 2.4.x kernel this will run the old hotplug system
# started with /etc/rc.d/rc.hotplug. On a newer kernel, hotplugging
# will be handled by udev. If you run a 2.6+ kernel, don't shut off
# udev unless you also don't want hotplugging support.
if cat /proc/mounts | grep -wq sysfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
if [ -d /dev/.udev/failed ]; then
for i in /dev/.udev/failed/*; do
echo "add" > "${i}/uevent"
done
fi
elif [ -x /etc/rc.d/rc.hotplug ]; then
. /etc/rc.d/rc.hotplug start
fi
fi
elif [ -x /etc/rc.d/rc.hotplug -a -w /proc/sys/kernel/hotplug ]; then
if ! grep -wq nohotplug /proc/cmdline ; then
. /etc/rc.d/rc.hotplug start
fi
fi
# Look for additional USB/SCSI/IEEE1394/etc devices on multiple LUNs:
if [ -x /etc/rc.d/rc.scanluns ]; then
. /etc/rc.d/rc.scanluns
fi
progressbar 70
# Start networking daemons:
if [ -x /etc/rc.d/rc.inet2 ]; then
. /etc/rc.d/rc.inet2
fi
# Remove stale locks and junk files (must be done after mount -a!)
/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/core /core 2> /dev/null
# Remove stale hunt sockets so the game can start.
if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then
echo "Removing your stale hunt sockets from /tmp."
/bin/rm -f /tmp/hunt*
fi
# Ensure basic filesystem permissions sanity.
chmod 755 / 2> /dev/null
chmod 1777 /tmp /var/tmp
progressbar 75
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig"
/sbin/ldconfig
fi
# Update the X font indexes:
if [ -x /usr/X11R6/bin/fc-cache ]; then
echo "Updating X font indexes: /usr/X11R6/bin/fc-cache"
/usr/X11R6/bin/fc-cache &
fi
# Start dnsmasq, a simple DHCP/DNS server:
if [ -x /etc/rc.d/rc.dnsmasq ]; then
/etc/rc.d/rc.dnsmasq start
fi
# Start the print spooling system. This will usually be LPRng (lpd) or CUPS.
if [ -x /etc/rc.d/rc.cups ]; then
# If HPLIP (HP's complete print/scan/fax system) is installed,
# then it should be run first:
if [ -x /etc/rc.d/rc.hplip ]; then
# Start HPLIP:
/etc/rc.d/rc.hplip start
fi
# Start CUPS:
/etc/rc.d/rc.cups start
elif [ -x /etc/rc.d/rc.lprng ]; then
# Start LPRng (lpd):
. /etc/rc.d/rc.lprng start
fi
progressbar 80
# Start netatalk. (a file/print server for Macs using Appletalk)
if [ -x /etc/rc.d/rc.atalk ]; then
/etc/rc.d/rc.atalk
fi
# Start smartd, which monitors the status of S.M.A.R.T. compatible
# hard drives and reports any problems. Note some devices (which aren't
# smart, I guess
will hang if probed by smartd, so it's commented out
# by default.
#if [ -x /usr/sbin/smartd ]; then
# /usr/sbin/smartd
#fi
# If we're using udev, make /dev/cdrom and any other optical drive symlinks
# if some udev rule hasn't made them already:
if cat /proc/mounts | grep -wq sysfs && cat /proc/filesystems | grep -wq tmpfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /lib/udev/rc.optical-symlinks -a -x /etc/rc.d/rc.udev ]; then
/bin/sh /lib/udev/rc.optical-symlinks
fi
fi
fi
progressbar 85
# Monitor the UPS with genpowerd.
# To use this, uncomment this section and edit your settings in
# /etc/genpowerd.conf (serial device, UPS type, etc). For more information,
# see "man genpowerd" or the extensive documentation in the
# /usr/doc/genpower-1.0.3 directory.
# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want
# support for stopping the UPS's inverter after the machine halts.
#if [ -x /sbin/genpowerd ]; then
# echo "Starting genpowerd daemon..."
# /sbin/genpowerd
#fi
progressbar 87
# Turn on process accounting. To enable process accounting, make sure the
# option for BSD process accounting is enabled in your kernel, and then
# create the file /var/log/pacct (touch /var/log/pacct). By default, process
# accounting is not enabled (since /var/log/pacct does not exist). This is
# because the log file can get VERY large.
if [ -x /sbin/accton -a -r /var/log/pacct ]; then
/sbin/accton /var/log/pacct
chmod 640 /var/log/pacct
echo "Process accounting turned on."
fi
# Start crond (Dillon's crond):
# If you want cron to actually log activity to /var/log/cron, then change
# -l10 to -l8 to increase the logging level.
if [ -x /usr/sbin/crond ]; then
/usr/sbin/crond -l10 >>/var/log/cron 2>&1
fi
progressbar 89
# Start atd (manages jobs scheduled with 'at'):
if [ -x /usr/sbin/atd ]; then
/usr/sbin/atd -b 15 -l 1
fi
# Slackware-Mini-Quota-HOWTO:
# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to
# the appropriate partitions as listed in /etc/fstab. Here's an example:
#
# /dev/hda2 /home ext3 defaults,usrquota 1 1
#
# You'll then need to setup initial quota files at the top of the partitions
# to support quota, like this:
# touch /home/aquota.user /home/aquota.group
# chmod 600 /home/aquota.user /home/aquota.group
#
# Then, reboot to activate the system.
# To edit user quotas, use 'edquota'. See 'man edquota'. Also, the
# official Quota Mini-HOWTO has lots of useful information. That can be found
# here: /usr/doc/Linux-HOWTOs/Quota
progressbar 92
# Check quotas and then turn quota system on:
if grep -q quota /etc/fstab ; then
if [ -x /sbin/quotacheck ]; then
echo "Checking filesystem quotas: /sbin/quotacheck -avugm"
/sbin/quotacheck -avugm
fi
if [ -x /sbin/quotaon ]; then
echo "Activating filesystem quotas: /sbin/quotaon -avug"
/sbin/quotaon -avug
fi
fi
progressbar 94
# Start the SASL authentication server. This provides SASL
# authentication services for sendmail:
if [ -x /etc/rc.d/rc.saslauthd ]; then
. /etc/rc.d/rc.saslauthd start
fi
# Start the sendmail daemon:
if [ -x /etc/rc.d/rc.sendmail ]; then
. /etc/rc.d/rc.sendmail start
fi
# Start APM or ACPI daemon.
# If APM is enabled in the kernel, start apmd:
if [ -e /proc/apm ]; then
if [ -x /usr/sbin/apmd ]; then
echo "Starting APM daemon: /usr/sbin/apmd"
/usr/sbin/apmd
fi
elif [ -x /etc/rc.d/rc.acpid ]; then # otherwise, start acpid:
. /etc/rc.d/rc.acpid start
fi
progressbar 98
# Load ALSA (sound) defaults:
if [ -x /etc/rc.d/rc.alsa ]; then
. /etc/rc.d/rc.alsa
fi
# Load a custom screen font if the user has an rc.font script.
if [ -x /etc/rc.d/rc.font ]; then
. /etc/rc.d/rc.font
fi
# Load a custom keymap if the user has an rc.keymap script.
if [ -x /etc/rc.d/rc.keymap ]; then
. /etc/rc.d/rc.keymap
fi
# Start the MySQL database:
if [ -x /etc/rc.d/rc.mysqld ]; then
. /etc/rc.d/rc.mysqld start &
fi
# Start Apache web server:
if [ -x /etc/rc.d/rc.httpd ]; then
. /etc/rc.d/rc.httpd start
fi
progressbar 100
# Start OpenLDAP:
if [ -x /etc/rc.d/rc.openldap ]; then
. /etc/rc.d/rc.openldap start
fi
# Start Samba (a file/print server for Win95/NT machines).
# Samba can be started in /etc/inetd.conf instead.
if [ -x /etc/rc.d/rc.samba ]; then
. /etc/rc.d/rc.samba start
fi
# Start the GPM mouse server:
if [ -x /etc/rc.d/rc.gpm ]; then
. /etc/rc.d/rc.gpm start
fi
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi
# All done.
e il mio rc.S
#!/bin/sh
#
# /etc/rc.d/rc.S: System initialization script.
#
# Mostly written by: Patrick J. Volkerding, <volkerdi@slackware.com>
#
/etc/rc.d/rc.bootsplash
animate startup
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# Mount /proc right away:
/sbin/mount -v proc /proc -n -t proc
# If 'nohotplug' was given at boot, or rc.hotplug has been turned off
# (and a 2.4.x kernel is running), then shut off hotplugging in the
# kernel now. Realize that if you turn off hotplugging support that
# you will have to load all the kernel modules that you need yourself
# (possibly in /etc/rc.d/rc.modules, which does not promise to list
# all of them), and make any additional device nodes that you need in
# the /dev directory.
if [ -w /proc/sys/kernel/hotplug ]; then
# Kernel command line option 'nohotplug' given, so we will shut off
# hotplugging even if it is not a good idea. Sometimes it *is* a
# good idea, especially when you're trying to figure out which
# kernel module is crashing the machine and needs to be added to
# your /etc/modprobe.d/blacklist (2.6+ kernels) and/or your
# /etc/hotplug/blacklist (2.4.x kernels).
if grep -wq nohotplug /proc/cmdline ; then
echo "/dev/null" > /proc/sys/kernel/hotplug
elif [ ! -x /etc/rc.d/rc.hotplug ]; then
# Ignore /etc/rc.d/rc.hotplug on kernels newer than 2.4.x:
if [ ! "$(uname -r | cut -f 1,2 -d .)" = "2.4" ]; then
# We must be running a 2.4.x kernel, so turn off hotplug:
echo "/dev/null" > /proc/sys/kernel/hotplug
fi
fi
fi
progressbar 10
# Start devfsd if necessary. On newer kernels, udev should be used instead.
if [ -x /etc/rc.d/rc.devfsd ]; then
/etc/rc.d/rc.devfsd start
fi
# Mount sysfs next, if the kernel supports it:
if [ -d /sys ]; then
if cat /proc/filesystems | grep -wq sysfs ; then
if ! cat /proc/mounts | grep -wq sysfs ; then
/sbin/mount -v sysfs /sys -n -t sysfs
fi
fi
fi
progressbar 15
# Enable swapping:
/sbin/swapon -a
# Test to see if the root partition is read-only, like it ought to be.
READWRITE=no
if touch /fsrwtestfile 2>/dev/null; then
rm -f /fsrwtestfile
READWRITE=yes
else
echo "Testing root filesystem status: read-only filesystem"
fi
# See if a forced filesystem check was requested at shutdown:
if [ -r /etc/forcefsck ]; then
FORCEFSCK="-f"
fi
progressbar 20
# Check the root filesystem:
if [ ! $READWRITE = yes ]; then
RETVAL=0
if [ ! -r /etc/fastboot ]; then
echo "Checking root filesystem:"
/sbin/fsck $FORCEFSCK -C -a /
RETVAL=$?
fi
progressbar 22
# An error code of 2 or higher will require a reboot.
if [ $RETVAL -ge 2 ]; then
# An error code equal to or greater than 4 means that some errors
# could not be corrected. This requires manual attention, so we
# offer a chance to try to fix the problem in single-user mode:
if [ $RETVAL -ge 4 ]; then
echo
echo "***********************************************************"
echo "*** An error occurred during the root filesystem check. ***"
echo "*** You will now be given a chance to log into the ***"
echo "*** system in single-user mode to fix the problem. ***"
echo "*** ***"
echo "*** If you are using the ext2 filesystem, running ***"
echo "*** 'e2fsck -v -y <partition>' might help. ***"
echo "***********************************************************"
echo
echo "Once you exit the single-user shell, the system will reboot."
echo
PS1="(Repair filesystem) \#"; export PS1
sulogin
else # With an error code of 2 or 3, reboot the machine automatically:
echo
echo "***********************************"
echo "*** The filesystem was changed. ***"
echo "*** The system will now reboot. ***"
echo "***********************************"
echo
fi
echo "Unmounting file systems."
/sbin/umount -a -r
/sbin/mount -n -o remount,ro /
echo "Rebooting system."
sleep 2
reboot -f
fi
progressbar 26
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
if [ $? -gt 0 ] ; then
echo
echo "Attempt to remount root device as read-write failed! This is going to"
echo "cause serious problems."
echo
echo "If you're using the UMSDOS filesystem, you **MUST** mount the root partition"
echo "read-write! You can make sure the root filesystem is getting mounted "
echo "read-write with the 'rw' flag to Loadlin:"
echo
echo "loadlin vmlinuz root=/dev/hda1 rw (replace /dev/hda1 with your root device)"
echo
echo "Normal bootdisks can be made to mount a system read-write with the rdev command:"
echo
echo "rdev -R /dev/fd0 0"
echo
echo "You can also get into your system by using a boot disk with a command like this"
echo "on the LILO prompt line: (change the root partition name as needed)"
echo
echo "LILO: mount root=/dev/hda1 rw"
echo
echo "Please press ENTER to continue, then reboot and use one of the above methods to"
echo -n "get into your machine and start looking for the problem. "
read junk;
fi
else
echo "Testing root filesystem status: read-write filesystem"
if cat /etc/fstab | grep ' / ' | grep -wq umsdos ; then
ROOTTYPE="umsdos"
fi
if [ ! "$ROOTTYPE" = "umsdos" ]; then # no warn for UMSDOS
echo
echo "*** ERROR: Root partition has already been mounted read-write. Cannot check!"
echo
echo "For filesystem checking to work properly, your system must initially mount"
echo "the root partition as read only. Please modify your kernel with 'rdev' so that"
echo "it does this. If you're booting with LILO, add a line:"
echo
echo " read-only"
echo
echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
echo
echo "If you boot from a kernel on a floppy disk, put it in the drive and type:"
echo " rdev -R /dev/fd0 1"
echo
echo "If you boot from a bootdisk, or with Loadlin, you can add the 'ro' flag."
echo
echo "This will fix the problem *AND* eliminate this annoying message. :^)"
echo
echo -n "Press ENTER to continue. "
read junk;
fi
fi # Done checking root filesystem
progressbar 30
# Any /etc/mtab that exists here is old, so we delete it to start over:
/bin/rm -f /etc/mtab*
# Remounting the / partition will initialize the new /etc/mtab:
/sbin/mount -w -o remount /
# Fix /etc/mtab to list sys and proc if they were not yet entered in
# /etc/mtab because / was still mounted read-only:
if [ -d /proc/sys ]; then
/sbin/mount -f proc /proc -t proc
fi
if [ -d /sys/bus ]; then
/sbin/mount -f sysfs /sys -t sysfs
fi
progressbar 33
# Initialize udev to manage /dev entries and hotplugging for 2.6.x kernels.
# You may turn off udev by making the /etc/rc.d/rc.udev file non-executable,
# but in the 2.6.x+ kernels udev has taken over the job of hotplug (finding
# hardware and loading the kernel modules for it, as well as creating device
# nodes in /dev). Realize that if you turn off udev that you will have to
# load all the kernel modules that you need yourself (possibly in
# /etc/rc.d/rc.modules, which does not promise to list all of them), and
# make any additional device nodes that you need in the /dev directory.
# Even USB and IEEE1394 devices will need to have the modules loaded by
# hand if udev is not used with a 2.6 kernel. So use it.
if cat /proc/mounts | grep -wq sysfs && cat /proc/filesystems | grep -wq tmpfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
/bin/sh /etc/rc.d/rc.udev start
/bin/sh /lib/udev/udev.count_events.sh
fi
fi
fi
progressbar 36
# Set the system time from the hardware clock using hwclock --hctosys.
if [ -x /sbin/hwclock ]; then
# Check for a broken motherboard RTC clock (where ioports for rtc are
# unknown) to prevent hwclock causing a hang:
if ! grep -q -w rtc /proc/ioports ; then
CLOCK_OPT="--directisa"
fi
if grep -wq "^UTC" /etc/hardwareclock ; then
echo "Setting system time from the hardware clock (UTC)."
/sbin/hwclock $CLOCK_OPT --utc --hctosys
else
echo "Setting system time from the hardware clock (localtime)."
/sbin/hwclock $CLOCK_OPT --localtime --hctosys
fi
fi
# Configure ISA Plug-and-Play devices:
if [ -r /etc/isapnp.conf ]; then
if [ -x /sbin/isapnp ]; then
/sbin/isapnp /etc/isapnp.conf
fi
fi
# This loads any kernel modules that are needed. These might be required to
# use your ethernet card, sound card, or other optional hardware.
# Priority is given first to a script named "rc.modules.local", then
# to "rc.modules-$FULL_KERNEL_VERSION", and finally to the plain "rc.modules".
# Note that if /etc/rc.d/rc.modules.local is found, then that will be the ONLY
# rc.modules script the machine will run, so make sure it has everything in
# it that you need.
if [ -x /etc/rc.d/rc.modules.local -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules.local:"
/bin/sh /etc/rc.d/rc.modules.local
elif [ -x /etc/rc.d/rc.modules-$(uname -r) -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules-$(uname -r):"
. /etc/rc.d/rc.modules-$(uname -r)
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules -a -L /etc/rc.d/rc.modules ]; then
echo "Running /etc/rc.d/rc.modules -> $(readlink /etc/rc.d/rc.modules):"
. /etc/rc.d/rc.modules
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules:"
. /etc/rc.d/rc.modules
fi
# Configure runtime kernel parameters:
if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then
/sbin/sysctl -e -p /etc/sysctl.conf
fi
progressbar 40
# Initialize the Logical Volume Manager.
# This won't start unless we find /etc/lvmtab (LVM1) or
# /etc/lvm/backup/ (LVM2). This is created by /sbin/vgscan, so to
# use LVM you must run /sbin/vgscan yourself the first time (and
# create some VGs and LVs).
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
echo "Initializing LVM (Logical Volume Manager):"
# Check for device-mapper support.
if ! cat /proc/devices | grep -wq device-mapper ; then
# If device-mapper exists as a module, try to load it.
if [ -r /lib/modules/$(/bin/uname -r)/kernel/drivers/md/dm-mod.ko ]; then
insmod /lib/modules/$(/bin/uname -r)/kernel/drivers/md/dm-mod.ko
fi
fi
# Scan for new volume groups:
KERNEL_VERSION=$(/bin/uname -r | /bin/cut -d . -f 1,2)
if [ "$KERNEL_VERSION" == "2.4" ]; then
/sbin/vgscan 2> /dev/null
else
/sbin/vgscan --ignorelockingfailure 2> /dev/null
fi
if [ $? = 0 ]; then
# Make volume groups available to the kernel.
# This should also make logical volumes available.
if [ "$KERNEL_VERSION" == "2.4" ]; then
/sbin/vgchange -ay
else
/sbin/vgchange -ay --ignorelockingfailure
fi
# Enable swapping again in case any LVs are used for swap. Ignore previous error.
/sbin/swapon -a
fi
fi
progressbar 45
# Check all the non-root filesystems:
if [ ! -r /etc/fastboot ]; then
echo "Checking non-root filesystems:"
/sbin/fsck $FORCEFSCK -C -R -A -a
fi
# Mount usbfs if we're not using hotplug:
if grep -wq usbfs /proc/filesystems; then
if /bin/grep -wq nohotplug /proc/cmdline || /bin/test ! -x /etc/rc.d/rc.hotplug ; then
if ! cat /proc/mounts | grep -wq usbfs ; then
/sbin/mount -v usbfs /proc/bus/usb -t usbfs
fi
fi
fi
progressbar 48
# Mount non-root file systems in fstab, but not NFS or SMB
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted. Also check that
# devpts is not already mounted before attempting to mount
# it. With 2.4.x kernels devpts is mounted from an fstab
# entry while with a 2.6.x or newer kernel udev mounts it.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
sleep 3
if /bin/grep -wq devpts /proc/mounts ; then
/sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
else
/sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
fi
# Enable swapping again. This is needed in case a swapfile is used,
# as it can't be enabled until the filesystem it resides on has been
# mounted read-write.
/sbin/swapon -a
# Clean up some temporary files:
( cd /var/log/setup/tmp && rm -rf * )
/bin/rm -f /var/run/utmp /var/run/*pid /etc/nologin /var/run/lpd* \
/var/run/ppp* /etc/dhcpc/*.pid /etc/forcefsck /etc/fastboot \
/var/state/saslauthd/saslauthd.pid
progressbar 50
# Create /tmp/{.ICE-unix,.X11-unix} if they are not present:
if [ ! -e /tmp/.ICE-unix ]; then
mkdir -p /tmp/.ICE-unix
chmod 1777 /tmp/.ICE-unix
fi
if [ ! -e /tmp/.X11-unix ]; then
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
fi
# Attempt to umount and remove any leftover /initrd:
if [ -d /initrd ]; then
umount /initrd/proc 2> /dev/null
/sbin/umount /initrd 2> /dev/null
rmdir /initrd 2> /dev/null
blockdev --flushbufs /dev/ram0 2> /dev/null
fi
# Create a fresh utmp file:
touch /var/run/utmp
chown root:utmp /var/run/utmp
chmod 664 /var/run/utmp
if [ "$ROOTTYPE" = "umsdos" ]; then # we need to update any files added in DOS:
echo "Synchronizing UMSDOS directory structure:"
echo " /sbin/umssync -r99 -v- /"
/sbin/umssync -r99 -v- /
fi
# Setup the /etc/motd to reflect the current kernel level:
# THIS WIPES ANY CHANGES YOU MAKE TO /ETC/MOTD WITH EACH BOOT.
# COMMENT THIS OUT IF YOU WANT TO MAKE A CUSTOM VERSION.
echo "$(/bin/uname -sr)." > /etc/motd
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Run serial port setup script:
# CAREFUL! This can make some systems hang if the rc.serial script isn't
# set up correctly. If this happens, you may have to edit the file from a
# boot disk, and/or set it as non-executable:
if [ -x /etc/rc.d/rc.serial ]; then
sh /etc/rc.d/rc.serial start
fi
# Carry an entropy pool between reboots to improve randomness.
if [ -f /etc/random-seed ]; then
echo "Using /etc/random-seed to initialize /dev/urandom."
cat /etc/random-seed > /dev/urandom
fi
# Use the pool size from /proc, or 512 bytes:
if [ -r /proc/sys/kernel/random/poolsize ]; then
dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(cat /proc/sys/kernel/random/poolsize) 2> /dev/null
else
dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
fi
chmod 600 /etc/random-seed
Vi ringrazio intanto ragazzi....
se volete vi posto i miei rc.M e rc.S
Il mio rc.M
#!/bin/sh
#
# rc.M This file is executed by init(8) when the system is being
# initialized for one of the "multi user" run levels (i.e.
# levels 1 through 6). It usually does mounting of file
# systems et al.
#
# Version: @(#)/etc/rc.d/rc.M 2.23 Wed Feb 26 19:20:58 PST 2003
#
# Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
# Heavily modified by Patrick Volkerding <volkerdi@slackware.com>
#
/etc/rc.d/rc.bootsplash
animate startup
# Tell the viewers what's going to happen.
echo "Going multiuser..."
# Screen blanks after 15 minutes idle time, and powers down in one hour
# if the kernel supports APM or ACPI power management:
/bin/setterm -blank 15 -powersave powerdown -powerdown 60
progressbar 55
# Set the hostname.
if [ -r /etc/HOSTNAME ]; then
/bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
else
# fall back on this old default:
echo "darkstar.example.net" > /etc/HOSTNAME
/bin/hostname darkstar
fi
progressbar 60
# Save the contents of 'dmesg':
/bin/dmesg -s 65536 > /var/log/dmesg
# If we are returning from single-user mode we will need to restart
# udevd on systems that use udev:
if ! ps axc | grep -wq udevd ; then
if grep -wq sysfs /proc/mounts && grep -wq tmpfs /proc/filesystems ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
/bin/sh /etc/rc.d/rc.udev start &
/bin/sh /lib/udev/udev.count_events.sh
fi
fi
fi
fi
progressbar 65
# Start the system logger.
if [ -x /etc/rc.d/rc.syslog -a -x /usr/sbin/syslogd -a -d /var/log ]; then
. /etc/rc.d/rc.syslog start &
fi
# Initialize PCMCIA devices:
#
# NOTE: This used to be started near the top of rc.S so that PCMCIA devices
# could be fsck'ed along with the other drives. This had some unfortunate
# side effects, however, since root isn't yet read-write, and /var might not
# even be mounted the .pid files can't be correctly written in /var/run and
# the pcmcia system can't be correctly shut down. If you want some PCMCIA
# partition to be mounted at boot (or when the card is inserted) then add
# the appropriate lines to /etc/pcmcia/scsi.opts.
#
# Note that the stuff in /etc/pcmcia/ is only for 2.4.x kernels using
# 16-bit PCMCIA cards (not 32-bit Cardbus cards!). For example, with a
# wireless card you might need to set options in /etc/pcmcia OR in
# /etc/rc.d/rc.wireless.conf, or even in /etc/rc.d/rc.inet1.conf (with
# extra options if needed for the encryption key, ESSID, etc.)
#
# Hopefully this situation will be unified in the future, but for now
# that's how it is...
#
#if [ -x /etc/rc.d/rc.pcmcia ]; then
# . /etc/rc.d/rc.pcmcia start
# # The cards might need a little extra time here to initialize.
# if [ -r /var/run/cardmgr.pid ]; then
# sleep 5
# fi
#fi
# Initialize the networking hardware.
if [ -x /etc/rc.d/rc.inet1 ]; then
. /etc/rc.d/rc.inet1
fi
# Initialize the hotplugging subsystem for Cardbus, IEEE1394, PCI, and
# USB devices. On a 2.4.x kernel this will run the old hotplug system
# started with /etc/rc.d/rc.hotplug. On a newer kernel, hotplugging
# will be handled by udev. If you run a 2.6+ kernel, don't shut off
# udev unless you also don't want hotplugging support.
if cat /proc/mounts | grep -wq sysfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
if [ -d /dev/.udev/failed ]; then
for i in /dev/.udev/failed/*; do
echo "add" > "${i}/uevent"
done
fi
elif [ -x /etc/rc.d/rc.hotplug ]; then
. /etc/rc.d/rc.hotplug start
fi
fi
elif [ -x /etc/rc.d/rc.hotplug -a -w /proc/sys/kernel/hotplug ]; then
if ! grep -wq nohotplug /proc/cmdline ; then
. /etc/rc.d/rc.hotplug start
fi
fi
# Look for additional USB/SCSI/IEEE1394/etc devices on multiple LUNs:
if [ -x /etc/rc.d/rc.scanluns ]; then
. /etc/rc.d/rc.scanluns
fi
progressbar 70
# Start networking daemons:
if [ -x /etc/rc.d/rc.inet2 ]; then
. /etc/rc.d/rc.inet2
fi
# Remove stale locks and junk files (must be done after mount -a!)
/bin/rm -f /var/lock/* /var/spool/uucp/LCK..* /tmp/.X*lock /tmp/core /core 2> /dev/null
# Remove stale hunt sockets so the game can start.
if [ -r /tmp/hunt -o -r /tmp/hunt.stats ]; then
echo "Removing your stale hunt sockets from /tmp."
/bin/rm -f /tmp/hunt*
fi
# Ensure basic filesystem permissions sanity.
chmod 755 / 2> /dev/null
chmod 1777 /tmp /var/tmp
progressbar 75
# Update all the shared library links:
if [ -x /sbin/ldconfig ]; then
echo "Updating shared library links: /sbin/ldconfig"
/sbin/ldconfig
fi
# Update the X font indexes:
if [ -x /usr/X11R6/bin/fc-cache ]; then
echo "Updating X font indexes: /usr/X11R6/bin/fc-cache"
/usr/X11R6/bin/fc-cache &
fi
# Start dnsmasq, a simple DHCP/DNS server:
if [ -x /etc/rc.d/rc.dnsmasq ]; then
/etc/rc.d/rc.dnsmasq start
fi
# Start the print spooling system. This will usually be LPRng (lpd) or CUPS.
if [ -x /etc/rc.d/rc.cups ]; then
# If HPLIP (HP's complete print/scan/fax system) is installed,
# then it should be run first:
if [ -x /etc/rc.d/rc.hplip ]; then
# Start HPLIP:
/etc/rc.d/rc.hplip start
fi
# Start CUPS:
/etc/rc.d/rc.cups start
elif [ -x /etc/rc.d/rc.lprng ]; then
# Start LPRng (lpd):
. /etc/rc.d/rc.lprng start
fi
progressbar 80
# Start netatalk. (a file/print server for Macs using Appletalk)
if [ -x /etc/rc.d/rc.atalk ]; then
/etc/rc.d/rc.atalk
fi
# Start smartd, which monitors the status of S.M.A.R.T. compatible
# hard drives and reports any problems. Note some devices (which aren't
# smart, I guess
# by default.
#if [ -x /usr/sbin/smartd ]; then
# /usr/sbin/smartd
#fi
# If we're using udev, make /dev/cdrom and any other optical drive symlinks
# if some udev rule hasn't made them already:
if cat /proc/mounts | grep -wq sysfs && cat /proc/filesystems | grep -wq tmpfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /lib/udev/rc.optical-symlinks -a -x /etc/rc.d/rc.udev ]; then
/bin/sh /lib/udev/rc.optical-symlinks
fi
fi
fi
progressbar 85
# Monitor the UPS with genpowerd.
# To use this, uncomment this section and edit your settings in
# /etc/genpowerd.conf (serial device, UPS type, etc). For more information,
# see "man genpowerd" or the extensive documentation in the
# /usr/doc/genpower-1.0.3 directory.
# You'll also need to configure a similar block in /etc/rc.d/rc.6 if you want
# support for stopping the UPS's inverter after the machine halts.
#if [ -x /sbin/genpowerd ]; then
# echo "Starting genpowerd daemon..."
# /sbin/genpowerd
#fi
progressbar 87
# Turn on process accounting. To enable process accounting, make sure the
# option for BSD process accounting is enabled in your kernel, and then
# create the file /var/log/pacct (touch /var/log/pacct). By default, process
# accounting is not enabled (since /var/log/pacct does not exist). This is
# because the log file can get VERY large.
if [ -x /sbin/accton -a -r /var/log/pacct ]; then
/sbin/accton /var/log/pacct
chmod 640 /var/log/pacct
echo "Process accounting turned on."
fi
# Start crond (Dillon's crond):
# If you want cron to actually log activity to /var/log/cron, then change
# -l10 to -l8 to increase the logging level.
if [ -x /usr/sbin/crond ]; then
/usr/sbin/crond -l10 >>/var/log/cron 2>&1
fi
progressbar 89
# Start atd (manages jobs scheduled with 'at'):
if [ -x /usr/sbin/atd ]; then
/usr/sbin/atd -b 15 -l 1
fi
# Slackware-Mini-Quota-HOWTO:
# To really activate quotas, you'll need to add 'usrquota' and/or 'grpquota' to
# the appropriate partitions as listed in /etc/fstab. Here's an example:
#
# /dev/hda2 /home ext3 defaults,usrquota 1 1
#
# You'll then need to setup initial quota files at the top of the partitions
# to support quota, like this:
# touch /home/aquota.user /home/aquota.group
# chmod 600 /home/aquota.user /home/aquota.group
#
# Then, reboot to activate the system.
# To edit user quotas, use 'edquota'. See 'man edquota'. Also, the
# official Quota Mini-HOWTO has lots of useful information. That can be found
# here: /usr/doc/Linux-HOWTOs/Quota
progressbar 92
# Check quotas and then turn quota system on:
if grep -q quota /etc/fstab ; then
if [ -x /sbin/quotacheck ]; then
echo "Checking filesystem quotas: /sbin/quotacheck -avugm"
/sbin/quotacheck -avugm
fi
if [ -x /sbin/quotaon ]; then
echo "Activating filesystem quotas: /sbin/quotaon -avug"
/sbin/quotaon -avug
fi
fi
progressbar 94
# Start the SASL authentication server. This provides SASL
# authentication services for sendmail:
if [ -x /etc/rc.d/rc.saslauthd ]; then
. /etc/rc.d/rc.saslauthd start
fi
# Start the sendmail daemon:
if [ -x /etc/rc.d/rc.sendmail ]; then
. /etc/rc.d/rc.sendmail start
fi
# Start APM or ACPI daemon.
# If APM is enabled in the kernel, start apmd:
if [ -e /proc/apm ]; then
if [ -x /usr/sbin/apmd ]; then
echo "Starting APM daemon: /usr/sbin/apmd"
/usr/sbin/apmd
fi
elif [ -x /etc/rc.d/rc.acpid ]; then # otherwise, start acpid:
. /etc/rc.d/rc.acpid start
fi
progressbar 98
# Load ALSA (sound) defaults:
if [ -x /etc/rc.d/rc.alsa ]; then
. /etc/rc.d/rc.alsa
fi
# Load a custom screen font if the user has an rc.font script.
if [ -x /etc/rc.d/rc.font ]; then
. /etc/rc.d/rc.font
fi
# Load a custom keymap if the user has an rc.keymap script.
if [ -x /etc/rc.d/rc.keymap ]; then
. /etc/rc.d/rc.keymap
fi
# Start the MySQL database:
if [ -x /etc/rc.d/rc.mysqld ]; then
. /etc/rc.d/rc.mysqld start &
fi
# Start Apache web server:
if [ -x /etc/rc.d/rc.httpd ]; then
. /etc/rc.d/rc.httpd start
fi
progressbar 100
# Start OpenLDAP:
if [ -x /etc/rc.d/rc.openldap ]; then
. /etc/rc.d/rc.openldap start
fi
# Start Samba (a file/print server for Win95/NT machines).
# Samba can be started in /etc/inetd.conf instead.
if [ -x /etc/rc.d/rc.samba ]; then
. /etc/rc.d/rc.samba start
fi
# Start the GPM mouse server:
if [ -x /etc/rc.d/rc.gpm ]; then
. /etc/rc.d/rc.gpm start
fi
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Start the local setup procedure.
if [ -x /etc/rc.d/rc.local ]; then
. /etc/rc.d/rc.local
fi
# All done.
e il mio rc.S
#!/bin/sh
#
# /etc/rc.d/rc.S: System initialization script.
#
# Mostly written by: Patrick J. Volkerding, <volkerdi@slackware.com>
#
/etc/rc.d/rc.bootsplash
animate startup
PATH=/sbin:/usr/sbin:/bin:/usr/bin
# Mount /proc right away:
/sbin/mount -v proc /proc -n -t proc
# If 'nohotplug' was given at boot, or rc.hotplug has been turned off
# (and a 2.4.x kernel is running), then shut off hotplugging in the
# kernel now. Realize that if you turn off hotplugging support that
# you will have to load all the kernel modules that you need yourself
# (possibly in /etc/rc.d/rc.modules, which does not promise to list
# all of them), and make any additional device nodes that you need in
# the /dev directory.
if [ -w /proc/sys/kernel/hotplug ]; then
# Kernel command line option 'nohotplug' given, so we will shut off
# hotplugging even if it is not a good idea. Sometimes it *is* a
# good idea, especially when you're trying to figure out which
# kernel module is crashing the machine and needs to be added to
# your /etc/modprobe.d/blacklist (2.6+ kernels) and/or your
# /etc/hotplug/blacklist (2.4.x kernels).
if grep -wq nohotplug /proc/cmdline ; then
echo "/dev/null" > /proc/sys/kernel/hotplug
elif [ ! -x /etc/rc.d/rc.hotplug ]; then
# Ignore /etc/rc.d/rc.hotplug on kernels newer than 2.4.x:
if [ ! "$(uname -r | cut -f 1,2 -d .)" = "2.4" ]; then
# We must be running a 2.4.x kernel, so turn off hotplug:
echo "/dev/null" > /proc/sys/kernel/hotplug
fi
fi
fi
progressbar 10
# Start devfsd if necessary. On newer kernels, udev should be used instead.
if [ -x /etc/rc.d/rc.devfsd ]; then
/etc/rc.d/rc.devfsd start
fi
# Mount sysfs next, if the kernel supports it:
if [ -d /sys ]; then
if cat /proc/filesystems | grep -wq sysfs ; then
if ! cat /proc/mounts | grep -wq sysfs ; then
/sbin/mount -v sysfs /sys -n -t sysfs
fi
fi
fi
progressbar 15
# Enable swapping:
/sbin/swapon -a
# Test to see if the root partition is read-only, like it ought to be.
READWRITE=no
if touch /fsrwtestfile 2>/dev/null; then
rm -f /fsrwtestfile
READWRITE=yes
else
echo "Testing root filesystem status: read-only filesystem"
fi
# See if a forced filesystem check was requested at shutdown:
if [ -r /etc/forcefsck ]; then
FORCEFSCK="-f"
fi
progressbar 20
# Check the root filesystem:
if [ ! $READWRITE = yes ]; then
RETVAL=0
if [ ! -r /etc/fastboot ]; then
echo "Checking root filesystem:"
/sbin/fsck $FORCEFSCK -C -a /
RETVAL=$?
fi
progressbar 22
# An error code of 2 or higher will require a reboot.
if [ $RETVAL -ge 2 ]; then
# An error code equal to or greater than 4 means that some errors
# could not be corrected. This requires manual attention, so we
# offer a chance to try to fix the problem in single-user mode:
if [ $RETVAL -ge 4 ]; then
echo
echo "***********************************************************"
echo "*** An error occurred during the root filesystem check. ***"
echo "*** You will now be given a chance to log into the ***"
echo "*** system in single-user mode to fix the problem. ***"
echo "*** ***"
echo "*** If you are using the ext2 filesystem, running ***"
echo "*** 'e2fsck -v -y <partition>' might help. ***"
echo "***********************************************************"
echo
echo "Once you exit the single-user shell, the system will reboot."
echo
PS1="(Repair filesystem) \#"; export PS1
sulogin
else # With an error code of 2 or 3, reboot the machine automatically:
echo
echo "***********************************"
echo "*** The filesystem was changed. ***"
echo "*** The system will now reboot. ***"
echo "***********************************"
echo
fi
echo "Unmounting file systems."
/sbin/umount -a -r
/sbin/mount -n -o remount,ro /
echo "Rebooting system."
sleep 2
reboot -f
fi
progressbar 26
# Remount the root filesystem in read-write mode
echo "Remounting root device with read-write enabled."
/sbin/mount -w -v -n -o remount /
if [ $? -gt 0 ] ; then
echo
echo "Attempt to remount root device as read-write failed! This is going to"
echo "cause serious problems."
echo
echo "If you're using the UMSDOS filesystem, you **MUST** mount the root partition"
echo "read-write! You can make sure the root filesystem is getting mounted "
echo "read-write with the 'rw' flag to Loadlin:"
echo
echo "loadlin vmlinuz root=/dev/hda1 rw (replace /dev/hda1 with your root device)"
echo
echo "Normal bootdisks can be made to mount a system read-write with the rdev command:"
echo
echo "rdev -R /dev/fd0 0"
echo
echo "You can also get into your system by using a boot disk with a command like this"
echo "on the LILO prompt line: (change the root partition name as needed)"
echo
echo "LILO: mount root=/dev/hda1 rw"
echo
echo "Please press ENTER to continue, then reboot and use one of the above methods to"
echo -n "get into your machine and start looking for the problem. "
read junk;
fi
else
echo "Testing root filesystem status: read-write filesystem"
if cat /etc/fstab | grep ' / ' | grep -wq umsdos ; then
ROOTTYPE="umsdos"
fi
if [ ! "$ROOTTYPE" = "umsdos" ]; then # no warn for UMSDOS
echo
echo "*** ERROR: Root partition has already been mounted read-write. Cannot check!"
echo
echo "For filesystem checking to work properly, your system must initially mount"
echo "the root partition as read only. Please modify your kernel with 'rdev' so that"
echo "it does this. If you're booting with LILO, add a line:"
echo
echo " read-only"
echo
echo "to the Linux section in your /etc/lilo.conf and type 'lilo' to reinstall it."
echo
echo "If you boot from a kernel on a floppy disk, put it in the drive and type:"
echo " rdev -R /dev/fd0 1"
echo
echo "If you boot from a bootdisk, or with Loadlin, you can add the 'ro' flag."
echo
echo "This will fix the problem *AND* eliminate this annoying message. :^)"
echo
echo -n "Press ENTER to continue. "
read junk;
fi
fi # Done checking root filesystem
progressbar 30
# Any /etc/mtab that exists here is old, so we delete it to start over:
/bin/rm -f /etc/mtab*
# Remounting the / partition will initialize the new /etc/mtab:
/sbin/mount -w -o remount /
# Fix /etc/mtab to list sys and proc if they were not yet entered in
# /etc/mtab because / was still mounted read-only:
if [ -d /proc/sys ]; then
/sbin/mount -f proc /proc -t proc
fi
if [ -d /sys/bus ]; then
/sbin/mount -f sysfs /sys -t sysfs
fi
progressbar 33
# Initialize udev to manage /dev entries and hotplugging for 2.6.x kernels.
# You may turn off udev by making the /etc/rc.d/rc.udev file non-executable,
# but in the 2.6.x+ kernels udev has taken over the job of hotplug (finding
# hardware and loading the kernel modules for it, as well as creating device
# nodes in /dev). Realize that if you turn off udev that you will have to
# load all the kernel modules that you need yourself (possibly in
# /etc/rc.d/rc.modules, which does not promise to list all of them), and
# make any additional device nodes that you need in the /dev directory.
# Even USB and IEEE1394 devices will need to have the modules loaded by
# hand if udev is not used with a 2.6 kernel. So use it.
if cat /proc/mounts | grep -wq sysfs && cat /proc/filesystems | grep -wq tmpfs ; then
if ! grep -wq nohotplug /proc/cmdline ; then
if [ -x /etc/rc.d/rc.udev ]; then
/bin/sh /etc/rc.d/rc.udev start
/bin/sh /lib/udev/udev.count_events.sh
fi
fi
fi
progressbar 36
# Set the system time from the hardware clock using hwclock --hctosys.
if [ -x /sbin/hwclock ]; then
# Check for a broken motherboard RTC clock (where ioports for rtc are
# unknown) to prevent hwclock causing a hang:
if ! grep -q -w rtc /proc/ioports ; then
CLOCK_OPT="--directisa"
fi
if grep -wq "^UTC" /etc/hardwareclock ; then
echo "Setting system time from the hardware clock (UTC)."
/sbin/hwclock $CLOCK_OPT --utc --hctosys
else
echo "Setting system time from the hardware clock (localtime)."
/sbin/hwclock $CLOCK_OPT --localtime --hctosys
fi
fi
# Configure ISA Plug-and-Play devices:
if [ -r /etc/isapnp.conf ]; then
if [ -x /sbin/isapnp ]; then
/sbin/isapnp /etc/isapnp.conf
fi
fi
# This loads any kernel modules that are needed. These might be required to
# use your ethernet card, sound card, or other optional hardware.
# Priority is given first to a script named "rc.modules.local", then
# to "rc.modules-$FULL_KERNEL_VERSION", and finally to the plain "rc.modules".
# Note that if /etc/rc.d/rc.modules.local is found, then that will be the ONLY
# rc.modules script the machine will run, so make sure it has everything in
# it that you need.
if [ -x /etc/rc.d/rc.modules.local -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules.local:"
/bin/sh /etc/rc.d/rc.modules.local
elif [ -x /etc/rc.d/rc.modules-$(uname -r) -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules-$(uname -r):"
. /etc/rc.d/rc.modules-$(uname -r)
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules -a -L /etc/rc.d/rc.modules ]; then
echo "Running /etc/rc.d/rc.modules -> $(readlink /etc/rc.d/rc.modules):"
. /etc/rc.d/rc.modules
elif [ -x /etc/rc.d/rc.modules -a -r /proc/modules ]; then
echo "Running /etc/rc.d/rc.modules:"
. /etc/rc.d/rc.modules
fi
# Configure runtime kernel parameters:
if [ -x /sbin/sysctl -a -r /etc/sysctl.conf ]; then
/sbin/sysctl -e -p /etc/sysctl.conf
fi
progressbar 40
# Initialize the Logical Volume Manager.
# This won't start unless we find /etc/lvmtab (LVM1) or
# /etc/lvm/backup/ (LVM2). This is created by /sbin/vgscan, so to
# use LVM you must run /sbin/vgscan yourself the first time (and
# create some VGs and LVs).
if [ -r /etc/lvmtab -o -d /etc/lvm/backup ]; then
echo "Initializing LVM (Logical Volume Manager):"
# Check for device-mapper support.
if ! cat /proc/devices | grep -wq device-mapper ; then
# If device-mapper exists as a module, try to load it.
if [ -r /lib/modules/$(/bin/uname -r)/kernel/drivers/md/dm-mod.ko ]; then
insmod /lib/modules/$(/bin/uname -r)/kernel/drivers/md/dm-mod.ko
fi
fi
# Scan for new volume groups:
KERNEL_VERSION=$(/bin/uname -r | /bin/cut -d . -f 1,2)
if [ "$KERNEL_VERSION" == "2.4" ]; then
/sbin/vgscan 2> /dev/null
else
/sbin/vgscan --ignorelockingfailure 2> /dev/null
fi
if [ $? = 0 ]; then
# Make volume groups available to the kernel.
# This should also make logical volumes available.
if [ "$KERNEL_VERSION" == "2.4" ]; then
/sbin/vgchange -ay
else
/sbin/vgchange -ay --ignorelockingfailure
fi
# Enable swapping again in case any LVs are used for swap. Ignore previous error.
/sbin/swapon -a
fi
fi
progressbar 45
# Check all the non-root filesystems:
if [ ! -r /etc/fastboot ]; then
echo "Checking non-root filesystems:"
/sbin/fsck $FORCEFSCK -C -R -A -a
fi
# Mount usbfs if we're not using hotplug:
if grep -wq usbfs /proc/filesystems; then
if /bin/grep -wq nohotplug /proc/cmdline || /bin/test ! -x /etc/rc.d/rc.hotplug ; then
if ! cat /proc/mounts | grep -wq usbfs ; then
/sbin/mount -v usbfs /proc/bus/usb -t usbfs
fi
fi
fi
progressbar 48
# Mount non-root file systems in fstab, but not NFS or SMB
# because TCP/IP is not yet configured, and not proc or sysfs
# because those have already been mounted. Also check that
# devpts is not already mounted before attempting to mount
# it. With 2.4.x kernels devpts is mounted from an fstab
# entry while with a 2.6.x or newer kernel udev mounts it.
# We also need to wait a little bit to let USB and other
# hotplugged devices settle (sorry to slow down the boot):
echo "Mounting non-root local filesystems:"
sleep 3
if /bin/grep -wq devpts /proc/mounts ; then
/sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs,nodevpts
else
/sbin/mount -a -v -t nonfs,nosmbfs,nocifs,noproc,nosysfs
fi
# Enable swapping again. This is needed in case a swapfile is used,
# as it can't be enabled until the filesystem it resides on has been
# mounted read-write.
/sbin/swapon -a
# Clean up some temporary files:
( cd /var/log/setup/tmp && rm -rf * )
/bin/rm -f /var/run/utmp /var/run/*pid /etc/nologin /var/run/lpd* \
/var/run/ppp* /etc/dhcpc/*.pid /etc/forcefsck /etc/fastboot \
/var/state/saslauthd/saslauthd.pid
progressbar 50
# Create /tmp/{.ICE-unix,.X11-unix} if they are not present:
if [ ! -e /tmp/.ICE-unix ]; then
mkdir -p /tmp/.ICE-unix
chmod 1777 /tmp/.ICE-unix
fi
if [ ! -e /tmp/.X11-unix ]; then
mkdir -p /tmp/.X11-unix
chmod 1777 /tmp/.X11-unix
fi
# Attempt to umount and remove any leftover /initrd:
if [ -d /initrd ]; then
umount /initrd/proc 2> /dev/null
/sbin/umount /initrd 2> /dev/null
rmdir /initrd 2> /dev/null
blockdev --flushbufs /dev/ram0 2> /dev/null
fi
# Create a fresh utmp file:
touch /var/run/utmp
chown root:utmp /var/run/utmp
chmod 664 /var/run/utmp
if [ "$ROOTTYPE" = "umsdos" ]; then # we need to update any files added in DOS:
echo "Synchronizing UMSDOS directory structure:"
echo " /sbin/umssync -r99 -v- /"
/sbin/umssync -r99 -v- /
fi
# Setup the /etc/motd to reflect the current kernel level:
# THIS WIPES ANY CHANGES YOU MAKE TO /ETC/MOTD WITH EACH BOOT.
# COMMENT THIS OUT IF YOU WANT TO MAKE A CUSTOM VERSION.
echo "$(/bin/uname -sr)." > /etc/motd
# If there are SystemV init scripts for this runlevel, run them.
if [ -x /etc/rc.d/rc.sysvinit ]; then
. /etc/rc.d/rc.sysvinit
fi
# Run serial port setup script:
# CAREFUL! This can make some systems hang if the rc.serial script isn't
# set up correctly. If this happens, you may have to edit the file from a
# boot disk, and/or set it as non-executable:
if [ -x /etc/rc.d/rc.serial ]; then
sh /etc/rc.d/rc.serial start
fi
# Carry an entropy pool between reboots to improve randomness.
if [ -f /etc/random-seed ]; then
echo "Using /etc/random-seed to initialize /dev/urandom."
cat /etc/random-seed > /dev/urandom
fi
# Use the pool size from /proc, or 512 bytes:
if [ -r /proc/sys/kernel/random/poolsize ]; then
dd if=/dev/urandom of=/etc/random-seed count=1 bs=$(cat /proc/sys/kernel/random/poolsize) 2> /dev/null
else
dd if=/dev/urandom of=/etc/random-seed count=1 bs=512 2> /dev/null
fi
chmod 600 /etc/random-seed
Vi ringrazio intanto ragazzi....
- Lean
- Linux 3.x

- Messaggi: 799
- Iscritto il: ven 18 mar 2005, 0:00
- Slackware: 12.1
- Kernel: 2.6.24.5-smp
- Desktop: KDE 3.5.9
- Località: Modena - Messina
- Contatta:
invece di
metti
(tra il punto e lo / c'è uno spazio)
Codice: Seleziona tutto
/etc/rc.d/rc.bootsplash
animate startup Codice: Seleziona tutto
. /etc/rc.d/rc.bootsplash
animate startup 