#!/bin/sh # if [ "$1" = "prereqs" ]; then exit 0 fi . /scripts/functions # if break=tftp STOP here maybe_break tftp . /conf/tcos.conf . /conf/tcos-run-functions if [ -e /usr/bin/Xorg ]; then # we have a mounted /usr with other method exit 0 fi ############################################### if [ ! -e /mnt/tmp/usr-$(uname -r).squashfs ] && [ ! -e /mnt/tmp/usr.squashfs ]; then # download usr.squashfs from tftp server # say to usplash more timeout if [ -x /sbin/usplash_write ]; then /sbin/usplash_write "TIMEOUT 180" || true fi log_begin_msg "Downloading usr.squashfs from $(read_server "tftp-server")" _log "SQMOUNT downloading squashfs" value=0 download_file /tcos/usr-$(uname -r).squashfs /mnt/tmp/usr-$(uname -r).squashfs || value=1 #sync #sleep 1 log_end_msg $value if [ "$(if_is_zero /mnt/tmp/usr-$(uname -r).squashfs)" = "0" ]; then panic "Error downloading extra data from server $(read_server "tftp-server")" fi #else # log_begin_msg "usr-$(uname -r).squashfs not downloaded" # sync # log_end_msg $? fi ############################################## # DOCUMENTME allmodules | download with tftp allmodules.squashfs to test what modules need thin client TCOS_ALL_MODULES_CMD=$(read_cmdline_var "allmodules" "0") if [ "$TCOS_ALL_MODULES_CMD" = "1" ] || [ ! -z $TCOS_ALL_MODULES_DOWNLOAD ]; then if [ ! -e /mnt/tmp/allmodules-$(uname -r).squashfs ] && [ ! -e /mnt/tmp/allmodules.squashfs ]; then # say to usplash more timeout if [ -x /sbin/usplash_write ]; then usplash_write "TIMEOUT 180" || true fi _log "SQMOUNT Downloading allmodules-$(uname -r).squashfs" log_begin_msg "Downloading all kernel modules: allmodules-$(uname -r).squashfs" download_file /tcos/allmodules-$(uname -r).squashfs /mnt/tmp/allmodules-$(uname -r).squashfs sync if [ "$(if_is_zero /mnt/tmp/allmodules-$(uname -r).squashfs)" = "0" ]; then echo -e "Error downloading allmodules" log_end_msg 1 exit 0 fi log_end_msg 0 fi fi echo 42 > /tmp/progress update_progress exit 0