From b2a4079c3d1da7632756a31c9c82ffe3f949eadb Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 9 Apr 2006 14:08:56 +0000 Subject: added bootlocal script (user def. script to run in normal boot), ensured ash shell compatibility of scripts ... git-svn-id: http://svn.openslx.org/svn/openslx/ld4@173 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initrd/initrd-stuff/bin/hwautocfg | 10 +++++----- initrd/initrd-stuff/bin/screenres | 9 +++------ initrd/initrd-stuff/bin/servconfig | 11 +++++++---- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'initrd/initrd-stuff/bin') diff --git a/initrd/initrd-stuff/bin/hwautocfg b/initrd/initrd-stuff/bin/hwautocfg index 69094dc5..fd1ab828 100755 --- a/initrd/initrd-stuff/bin/hwautocfg +++ b/initrd/initrd-stuff/bin/hwautocfg @@ -134,25 +134,25 @@ if [ -n "$hw_monitor" ] ; then [ -z "$VS" ] && VS=${hw_monitor%hz*} VS=${VS##* } MR=${hw_monitor##* } - msg="Please check your predefined monitor settings ($hw_monitor): Manual\n\ + hwmsg="Please check your predefined monitor settings ($hw_monitor): Manual\n\ configurtion of display" else # gather monitor information automatically ddcprobe > /tmp/ddcprobe - msg="Please check the output of ddcprobe. The settings where not \ + hwmsg="Please check the output of ddcprobe. The settings where not \ complete\n or non existant. The $0 script tried for a fully automatic\n\ configuration of display" fi -if [ -z "$HS" ] ; then error " $msg timings requested but could not \ +if [ -z "$HS" ] ; then error " $hwmsg timings requested but could not \ establish\n horizontal frequency in kHz." nonfatal HS=${HSYNCRANGE} fi -if [ -z "$VS" ] ; then error " $msg timings but could not establish \ +if [ -z "$VS" ] ; then error " $hwmsg timings but could not establish \ vertical\n frequency in Hz." nonfatal VS=${VSYNCRANGE} fi -if [ -z "$MR" ] ; then error " $msg resolution requested but not \ +if [ -z "$MR" ] ; then error " $hwmsg resolution requested but not \ established." nonfatal MR=${MAXRES} fi diff --git a/initrd/initrd-stuff/bin/screenres b/initrd/initrd-stuff/bin/screenres index 0f5528f5..97aaa005 100755 --- a/initrd/initrd-stuff/bin/screenres +++ b/initrd/initrd-stuff/bin/screenres @@ -23,8 +23,7 @@ # enable debugging in higher debug levels [ $DEBUGLEVEL -gt 1 ] && DEBUG="yes" -function calculate_max_horizontal_freq() -{ +calculate_max_horizontal_freq () { highest_resolution=` echo $screen_resolutions | sed -n 's/"\([0-9x]*\)" .*/\1/p'` freq_for_highest_res=`sed -n /$highest_resolution'/s/[^@]*@\([0-9]\{2,3\}\).*/\1/p' $tmp_ddcprobe_output | sort -nr|sed -n 1p` if [ -z "$freq_for_highest_res" ]; then @@ -36,8 +35,7 @@ function calculate_max_horizontal_freq() horiz_freq_khz=$(( $highest_res_line_count * $freq_for_highest_res / 950)) # 950 = 0,95 * 1000 (invisible range * Kilohertz) [ -n "$DEBUG" ] && echo " Assumed Horizontal Frequency: $horiz_freq_khz" } -function determine_recommended_crt_modes() -{ +determine_recommended_crt_modes () { ## Introduce the standard resolution 1400x1050 as it is seldom in the list the monitors output, though supported [ -n "$DEBUG" ] && echo "Screen Modes: $screen_resolutions" if [ -z "`echo $screen_resolutions|sed -n /1400/p`" ]; then @@ -83,8 +81,7 @@ function determine_recommended_crt_modes() ########## } -function define_max_recommended_horizontal_pixel_count() -{ +define_max_recommended_horizontal_pixel_count () { ## To high resolutions are not wanted on small screens ##################################### # For 15 inch and below if [ $screen_size_in_qcm -lt 704 ]; then max_wanted_resolution=1024 diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index 7b8bb569..13cdc25a 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -4,9 +4,7 @@ # for linux diskless clients (executed within initial # ramdisk) # -# Author(s): Dirk von Suchodoletz , 03-04-2006 -# Blabla -# Blub +# Author(s): Dirk von Suchodoletz , 09-04-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg # @@ -28,7 +26,12 @@ ####################################################################### # copy distro specific scripts, programs, libraries and configs -cp -a /etc/sysconfig/files/* /mnt 2>/dev/null +cp -a /etc/sysconfig/files/* /mnt 2>/dev/null & +# boot.local file (different for several distros) +[ -f "/etc/boot.local" -a -n "${D_BOOTLOCAL}" ] && { + echo "# added by $0 (initramfs from $date)" >> /mnt/etc/${D_BOOTLOCAL} + cat /etc/boot.local >> /mnt/etc/${D_BOOTLOCAL} +} # set greeting echo " -- cgit v1.2.3-55-g7522