Changeset 6f96fdf


Ignore:
Timestamp:
05/08/13 17:45:33 (16 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3
Children:
6ffb65b
Parents:
4950767
Message:

Add ability to start first boot wizard immediately after the X gui is run

This means we don't have to wait for X to shutdown, then re-launch and may fix some
bugs with X shutdowns causing a crash

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-xgui/resources/scripts/xinit-autodetect

    r1620346 r6f96fdf  
    11#!/bin/sh  
     2 
     3# Source our functions 
     4. /usr/local/share/pcbsd/scripts/functions.sh 
    25 
    36# Set all our path variables 
     
    2629fi 
    2730/usr/local/bin/pc-xgui 
    28 if [ "$?" = "1" ] ; then 
     31if [ "$?" = "0" ] ; then 
     32 # Run the firstboot script immediately 
     33 run_firstboot 
     34else 
    2935 echo "Canceled" > ${XGUITMP}/.canceled 
    3036fi 
  • src-sh/pc-firstgui/pc-firstgui

    r1620346 r6f96fdf  
    11#!/bin/sh 
    22# Script to startup the first run setup gui  
     3 
     4# Source our functions 
     5. /usr/local/share/pcbsd/scripts/functions.sh 
    36 
    47# Check if we need to save an existing .xinitrc file 
     
    2124 
    2225# Create the .xinitrc file 
    23 echo '# Set all our path variables 
    24 PATH="/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/bin:/usr/local/sbin" 
    25 HOME="/root" 
    26 export PATH HOME 
     26echo ' 
    2727 
    28 # Unset the PROGDIR variable 
    29 PROGDIR="" 
    30 export PROGDIR 
    31  
    32 if [ -e "/root/.xprofile" ] ; then . /root/.xprofile ; fi 
    33  
    34 # Figure out which intro video to play 
    35 res=`xdpyinfo | grep dimensions: | awk "{print $2}"` 
    36 h=`echo $res | cut -d "x" -f 1` 
    37 w=`echo $res | cut -d "x" -f 2` 
    38 h=`expr 100 \* $h` 
    39 ratio=`expr $h \/ $w | cut -c 1-2` 
    40 case $ratio in 
    41    13) mov="PCBSD9_4-3_UXGA.flv";; 
    42    16) mov="PCBSD9_16-10_WUXGA.flv";; 
    43    17) mov="PCBSD9_16-9_1080p.flv";; 
    44     *) mov="PCBSD9_4-3_UXGA.flv";; 
    45 esac 
    46  
    47 # Play the video now 
    48 mplayer -fs -nomouseinput -zoom /usr/local/share/pcbsd/movies/$mov 
    49  
    50 # Setting a language 
    51 if [ -e "/etc/pcbsd-lang" ] ; then 
    52    LANG=`cat /etc/pcbsd-lang` 
    53    export LANG 
    54 fi 
     28# Source our functions 
     29. /usr/local/share/pcbsd/scripts/functions.sh 
    5530 
    5631# Start fluxbox 
     
    5833PID=$! 
    5934 
    60 # Start first-boot wizard 
    61 /usr/local/bin/pc-firstboot 
    62 if [ $? -eq 0 ] ; then 
    63   rm /var/.pcbsd-firstgui 
    64 fi 
     35# Run the firstboot wizard in functions.sh 
     36run_firstboot 
     37 
    6538kill -9 ${PID}' > /root/.xinitrc 
    6639chmod 755 /root/.xinitrc 
Note: See TracChangeset for help on using the changeset viewer.