source: overlays/install-overlay/root/PCBSDStart.sh @ 794e0d2

9.2-releasereleng/10.0releng/10.0.1releng/10.0.2
Last change on this file since 794e0d2 was 794e0d2, checked in by Kris Moore <kris@…>, 15 months ago

Check if we have FBSD media on disk, and enable a flag if not

  • Property mode set to 100755
File size: 2.5 KB
RevLine 
[1620346]1#!/bin/sh
2# Copyright 2007 PC-BSD Software
3# http://www.pcbsd.com
4# Author: Kris Moore
5###########################################################################
6MM_CHARSET="UTF-8" ; export MM_CHARSET
7LANG="en_US.UTF-8" ; export LANG
8LC_CTYPE="en_US.UTF-8" ; export LC_CTYPE     
9LC_COLLATE="POSIX" ; export LC_COLLATE
10
11# Make sure this is only executed on the first login, in order for other ctrl-fX screens to work
12if [ -f "/tmp/1stRun" ] 
13then
14  exit
15fi
16
17touch /tmp/1stRun
18
19# Make /var/tmp link
20mv /var/tmp /tmp/vartmp
21ln -s /tmp/vartmp /var/tmp
22
23# Check ZFS tmpdir
24if [ ! -d "/tmp/zfs" ] ; then
25  mkdir /tmp/zfs
26  if [ $? -ne 0 ] ; then
27     echo "Error creating /tmp/zfs, ZFS installs will not work!"
28     echo "Press ENTER to continue"
29     read tmp
30  fi
31fi
32
[794e0d2]33# Check if we have FreeBSD dist files on this media
34if [ ! -d "/dist-fbsd" ] ; then
35   touch /tmp/no-fbsd-release
36fi
37
[a37ff35]38# Enable the debug version of pc-sysinstall
39/root/debugpcsysinstall.sh
40
[1620346]41# Check if we are booting in LIVE or INSTALL mode
42if [ -e "/usr/pcbsd-live" ]; then
43
44  # Check if we should be going to the console instead of X directly
45  /sbin/sysctl kern.module_path | /usr/bin/grep "CONSOLE" >/dev/null 2>/dev/null
46  FOUND="$?"
47  if [ "$FOUND" = "0" ]
48  then
49    /root/PCBSDtext.sh
50    shutdown -r now
51    exit
52  fi
53
54  # We are running LIVE mode, start that script now
55  sh /root/PCBSDStartLive.sh
56  exit 0
57fi
58
59# Source our functions
60. /root/functions.sh
61
62# Check if we have an auto-install directive
63if [ -e "/tmp/pc-autoinstall.conf" ]
64then
65  # Start the parser on this directive and begin the install
66  /usr/sbin/pc-sysinstall start-autoinstall /tmp/pc-autoinstall.conf
67fi
68
69# Run the intial sorting of directories
70mv /root/.fluxbox /memfs/
71ln -s /memfs/.fluxbox /root/.fluxbox
72
73# Create the .qt directory
74mkdir /tmp/.qt
75mkdir /tmp/xkb
76
77# Check if we should be going to the console instead of X directly
78/sbin/sysctl kern.module_path | /usr/bin/grep "CONSOLE" >/dev/null 2>/dev/null
79FOUND="$?"
80if [ "$FOUND" = "0" ]
81then
82  /root/PCBSDtext.sh
83  shutdown -r now
84  exit
85fi
86
87# Now run the X auto-detection
88detect_x
89
90# Now start xorg
91start_xorg
92
93# Check if we had a successful SysInstaller exit
94if [ -e "/root/.exitStatus" ] ; then
95  STATUS="`cat /root/.exitStatus`"
96  if [ "$STATUS" = "0" ] ; then
97    shutdown -r now
98  else
99    echo "Installation failed! Press any key to drop to shell or type 'reboot' to restart the system"
100    read tmp
101    if [ "$tmp" = "reboot" ] ; then
102      shutdown -r now
103    else
104      /bin/sh
105    fi
106  fi
107fi
Note: See TracBrowser for help on using the repository browser.