summaryrefslogtreecommitdiffstats
path: root/initrd/initrd-stuff
diff options
context:
space:
mode:
Diffstat (limited to 'initrd/initrd-stuff')
-rwxr-xr-xinitrd/initrd-stuff/bin/hwautocfg9
-rwxr-xr-xinitrd/initrd-stuff/bin/screenres2
-rwxr-xr-xinitrd/initrd-stuff/bin/servconfig19
-rw-r--r--initrd/initrd-stuff/etc/functions18
4 files changed, 26 insertions, 22 deletions
diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg
index 526e59b6..bc9ffd11 100755
--- a/initrd/initrd-stuff/bin/hwautocfg
+++ b/initrd/initrd-stuff/bin/hwautocfg
@@ -181,9 +181,8 @@ for section in Files ServerFlags Module InputDevice Monitor \
sed -e "s,XMODULE,${XMODULE}," -e "s%XDESC%${XDESC}%" >>$xfc
# special options may be needed for some drivers
[ $DEBUGLEVEL -gt 1 ] && msg "X setup" \
-"adding for some Xfree86 modules \
-(radeon, s3virge, nvidia) special options to\nthe 'Device' section. Consult \
-hwsetup if you like to add more or remove some."
+"adding for some Xfree86 modules (radeon, s3virge, nvidia) special\noptions \
+to the 'Device' section. Consult hwsetup if you like to add more or\nremove some."
[ x$DRV = "xs3virge" ] && {
echo -e "\tOption\t\t\"XVideo\" \"Off\"\n" >>$xfc
[ $DEBUGLEVEL -gt 1 ] && msg "X setup" \
@@ -279,10 +278,10 @@ modprobe ${MODPRV} usbcore &
# "drivers" (pseudo, placeholder strings, ...) to exclude from loading
# depending on distro more hw modules have to be excluded too. use the
# D_HWMODTOIGNORE for that purpose
-DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev\
+DRIVERLIST=" disabled unknown ignore pcspkr synaptics keybdev kanotix\
${D_HWMODTOIGNORE} "
# driver blacklist (real modules which fail to load)
-DRIVERLIST=${DRIVERLIST}"hw_random kanotix genericwheelusb "
+DRIVERLIST=${DRIVERLIST}"hw_random genericwheelusb "
# hack for pseudo modules (not to load)
for i in $DRIVERLIST ; do
echo -e "alias\t$i\tusbcore" >> /etc/modprobe.conf
diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres
index 8a04f40a..ad263ae9 100755
--- a/initrd/initrd-stuff/bin/screenres
+++ b/initrd/initrd-stuff/bin/screenres
@@ -62,7 +62,7 @@ fi
echo " ($tft_probability)"
# Find the lines with two times 3 to 4 digits delimited by an x. Print with the two values reverted, so sort sorts w.r.t the 2nd value. Then swap back
-screen_resolutions=`sed -n '/edid/I,$s/.*[ \t]\([0-9]\{3,4\}\) *x *\([0-9]\{3,4\}\).*/\2 x \1/p' ${tmp_ddcprobe_output}| sort -r -n | uniq| sed -n 's/\([0-9]\{3,4\}\) x \([0-9]\{3,4\}\).*/"\2x\1"/p' `
+screen_resolutions=`sed -n '/edid/I,$s/.*[ \t]\([0-9]\{3,4\}\) *x *\([0-9]\{3,4\}\).*/\2 x \1/p' ${tmp_ddcprobe_output}| sort -rn | sort -rnu | sed -n 's/\([0-9]\{3,4\}\) x \([0-9]\{3,4\}\).*/"\2x\1"/p' `
screen_resolutions=`echo $screen_resolutions`
echo "Supported Screen Modes: $screen_resolutions"
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig
index 6de5ba48..2be55ba7 100755
--- a/initrd/initrd-stuff/bin/servconfig
+++ b/initrd/initrd-stuff/bin/servconfig
@@ -192,19 +192,24 @@ config_snmp 24 02
# create needed directories and files
if [ "x$vmware" != "x" ] || [ "x$vmware" != "xno" ] ; then
# in the future other types of sources besides NFS should be supported
- mount -t nfs -o ro,nolock,intr,nodev,soft,timeo=2,nosuid \
- ${imgsrv} /mnt/${vmdir} &
+ for i in /var/lib/vmware /etc/vmware/vmnet1 /etc/vmware/vmnet8 \
+ /var/run/vmware ; do
+ testmkd /mnt/$i
+ done
+ # mount the vmware image source or link it (compatibility to ver. 3)
+ if [ -d /mnt/usr/share/vmware ] ; then
+ ln -sf /usr/share/vmware /var/lib/vmware
+ elif [ -n "${imgsrv}" ] ; then
+ mount -t nfs -o ro,nolock,intr,nodev,soft,timeo=2,nosuid \
+ ${imgsrv} /mnt/var/lib/vmware &
+ fi
# generate a runlevel script
- d_mkrlscript init vmware-prep "Starting preparation of vmware environment"
+ d_mkrlscript init vmware-prep 'Starting preparation of vmware environment'
sed "s,^#.*,,;/^$/d;s,^,\t," /etc/vmware-prep >> \
/mnt/etc/${D_INITDIR}/vmware-prep
d_mkrlscript close vmware-prep ""
chmod u+x /mnt/etc/${D_INITDIR}/vmware-prep
config_vmware
- for i in /var/lib/vmware /etc/vmware/vmnet1 /etc/vmware/vmnet8 \
- /var/run/vmware ; do
- testmkd /mnt/$i
- done
chmod 1777 /mnt/var/run/vmware
rm /mnt/etc/vmware/not_configured 2>/dev/null
# define a variable where gdm/kdm should look for additional sessions
diff --git a/initrd/initrd-stuff/etc/functions b/initrd/initrd-stuff/etc/functions
index 3e5b7a8a..65a811ca 100644
--- a/initrd/initrd-stuff/etc/functions
+++ b/initrd/initrd-stuff/etc/functions
@@ -12,7 +12,7 @@
#######################################################################
# generate events with the sysfs trigger
-function trigger_device_events() {
+trigger_device_events () {
list=$(echo /sys/bus/*/devices/*/uevent)
list="$list $(echo /sys/class/*/*/uevent)"
list="$list $(echo /sys/block/*/uevent /sys/block/*/*/uevent)"
@@ -40,7 +40,7 @@ function trigger_device_events() {
#######################################################################
# produce error message and if $2 is empty run (debug) shell
-error() {
+error () {
local message="An error occured during execution of $0 script:\n\n$1\n"
# check if LOGFILE is really writeable
if [ -n "${LOGFILE}" ] ; then
@@ -61,7 +61,7 @@ else
/bin/sh
fi
}
-msg() {
+msg () {
echo -e "$1 info: $2"
}
#######################################################################
@@ -75,7 +75,7 @@ return 0
#######################################################################
# load a certain module - name of module with path in argument one, the
# error message in second argument
-loadmod() {
+loadmod () {
local modpath=$1
local module=`echo $modpath|sed -e "s,.*/,,"`
local msg=$2
@@ -87,7 +87,7 @@ fi
}
#######################################################################
# compute prefix bit number from netmask
-nm2pref() {
+nm2pref () {
set `IFS="."; echo $1`
local n=0
for i in $1 $2 $3 $4 ; do
@@ -144,7 +144,7 @@ esac
}
#######################################################################
# nfs mounter
-nfsmnt()
+nfsmnt ()
{
local nfsroot=$1
errmsg=" Mount of root filesystem via NFS was requested via kernel command \
@@ -176,7 +176,7 @@ esac
}
#######################################################################
# create configuration file for dhclient
-mkdhclconf() {
+mkdhclconf () {
local vci=$1
# provide dhclient with proper configuration
echo -e "option bootlocal-script code 221\t= string;\n\
@@ -205,7 +205,7 @@ fi
#######################################################################
# dhcp client
-rundhcp()
+rundhcp ()
{
local commonerr=" The following problems could produce that error:\n\
* The af_packet.ko module is either not loaded nor present in kernel.\n\
@@ -326,7 +326,7 @@ strinstr (){
#done
#return 1
#}
-strinfile(){
+strinfile (){
case "$(cat $2)" in *$1*) return 0;; esac
return 1
}