[Lunar-commits] r15060 - lunar-iso/branches/lunar-iso-2.6/initrd/template/sbin
Jaime Buffery
nestu at lunar-linux.org
Wed May 25 21:36:37 UTC 2005
Author: nestu
Date: 2005-05-25 21:36:36 +0000 (Wed, 25 May 2005)
New Revision: 15060
Modified:
lunar-iso/branches/lunar-iso-2.6/initrd/template/sbin/init
Log:
More syncing with trunk
Modified: lunar-iso/branches/lunar-iso-2.6/initrd/template/sbin/init
===================================================================
--- lunar-iso/branches/lunar-iso-2.6/initrd/template/sbin/init 2005-05-25 21:16:07 UTC (rev 15059)
+++ lunar-iso/branches/lunar-iso-2.6/initrd/template/sbin/init 2005-05-25 21:36:36 UTC (rev 15060)
@@ -12,7 +12,7 @@
shell()
{
echo "Press CTRL-D or type exit to return"
- /bin/sh
+ sh
}
@@ -26,11 +26,11 @@
case $ITEM in
modules.*) continue ;;
esac
- /bin/echo "$ITEM"
+ echo "$ITEM"
if [ -d "$ITEM" ]; then
- /bin/echo "Directory"
+ echo "Directory"
else
- /bin/echo "Module"
+ echo "Module"
fi
done
}
@@ -44,7 +44,7 @@
auto_load_modules()
{
- MODULES=$(/bin/discover --data-path=linux/module/name --format="%s" --data-version=`uname -r` fixeddisk optical removabledisk tape)
+ MODULES=$(discover --data-path=linux/module/name --format="%s" --data-version=`uname -r` fixeddisk optical removabledisk tape)
if [ -z "$1" ]; then
MODULES=`$DIALOG --inputbox "The following modules will be attempted to load. Press enter to load them, or edit the list manually. To cancel select 'Cancel'." 10 60 "$MODULES"`
@@ -54,11 +54,11 @@
modprobe $MODULE
if [ -z "$1" ]; then
sleep 2
- fi
+ fi
done
if [ -z "$1" ]; then
echo "Finished loading modules!"
- sleep 5
+ sleep 2
fi
}
@@ -79,10 +79,10 @@
return
fi
if [ -f "$CHOICE" ]; then
- MODULE=`/bin/basename $MODULE | /bin/sed -e "s/\.o$//" -e "s/\.ko$//"`
+ MODULE=`basename $CHOICE | sed -e "s/\.o$//" -e "s/\.ko$//"`
PARAMETERS=`input_module_parameters` &&
- /sbin/modprobe $CHOICE $PARAMETERS
- /bin/sleep 5
+ modprobe $MODULE $PARAMETERS
+ sleep 2
elif [ -d "$CHOICE" ]; then
cd "$CHOICE"
fi
@@ -96,14 +96,14 @@
if [ -z "$LUNAR_CD" ]; then
COUNT=0
while [ -e "$DEVICE$COUNT" ]; do
- /bin/mount -n -r -t iso9660 $DEVICE$COUNT /mnt 2>/dev/null
+ mount -n -r -t iso9660 $DEVICE$COUNT /mnt 2>/dev/null
if [ -e "/mnt/.lunar-cd" ]; then
- /bin/umount -n /mnt 2>/dev/null
+ umount -n /mnt 2>/dev/null
LUNAR_CD=$DEVICE$COUNT
break
else
(( COUNT++ ))
- /bin/umount -n /mnt 2>/dev/null
+ umount -n /mnt 2>/dev/null
fi
done
fi
@@ -112,7 +112,7 @@
show_filesystems()
{
- for FILESYSTEM in `/bin/cat /proc/filesystems | /bin/grep -v nodev`; do
+ for FILESYSTEM in `cat /proc/filesystems | grep -v nodev`; do
echo $FILESYSTEM
echo filesystem
done
@@ -186,25 +186,25 @@
OPTIONS="defaults,ro"
fi
- if /bin/mount -n -t $VFSTYPE -o $OPTIONS $ROOT /mnt && [ -x /mnt/sbin/init ]; then
- if /bin/echo $KERNEL | /bin/grep -q "^2\.4\." ; then
- /bin/pkill devfsd
+ if mount -n -t $VFSTYPE -o $OPTIONS $ROOT /mnt && [ -x /mnt/sbin/init ]; then
+ if echo $KERNEL | /bin/grep -q "^2\.4\." ; then
+ pkill devfsd
sleep 1
else
- /bin/pkill udevd
+ pkill udevd
sleep 1
- /bin/umount -n /sys
- /bin/umount -n /dev/pts
+ umount -n /sys
+ umount -n /dev/pts
fi
- /bin/umount -n /proc
- /bin/umount -n /dev
- /sbin/pivot_root /mnt /mnt
+ umount -n /proc
+ umount -n /dev
+ pivot_root /mnt /mnt
exec /sbin/init $*
else
- $DIALOG --msgbox "Unable to locate /sbin/init on $ROOT." 0 0
- /bin/umount -n /mnt
- main $*
+ $DIALOG --msgbox "Unable to locate /sbin/init on $ROOT." 0 0
+ umount -n /mnt
+ main $*
fi
}
@@ -217,31 +217,35 @@
}
+export PATH=/bin:/usr/bin:/sbin:/usr/sbin
export IFS="
"
export DIALOGRC=/etc/dialogrc
-DIALOG="/usr/bin/dialog
+DIALOG="dialog
--backtitle
Lunar Linux Install/Rescue CDROM
--stdout"
-KERNEL=`/bin/uname -r`
+mount -n -t proc proc /proc
+
+KERNEL=`uname -r`
DEVICE="/dev/cdroms/cdrom"
-/bin/mount -n -t proc proc /proc
-
-if /bin/echo $KERNEL | /bin/grep -q "^2\.4\." ; then
- /bin/mount -n -t devfs devfs /dev
- /sbin/devfsd /dev &
+if echo $KERNEL | grep -q "^2\.4\." ; then
+ mount -n -t devfs devfs /dev
+ devfsd /dev &
else
- /bin/mount -t sysfs sysfs /sys
- /bin/mount -t ramfs none /dev
- /bin/echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
- /sbin/udevstart
- /bin/mkdir /dev/{pts,shm}
- /bin/mount -t devpts devpts /dev/pts
+ mount -t sysfs sysfs /sys
+ mount -t ramfs none /dev
+ echo "/sbin/udevsend" > /proc/sys/kernel/hotplug
+ udevstart
+ mkdir /dev/{pts,shm}
+ mount -t devpts devpts /dev/pts
fi
+# short timeout, we really need to be able to see debug info
+sleep 2
+
# fastboot or not?
if cat /proc/cmdline | grep -q 'skipinitrd=1'; then
echo ""
More information about the Lunar-commits
mailing list