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

9.1-release9.2-releasereleng/10.0releng/10.0.1releng/10.0.2releng/10.0.3
Last change on this file since 1620346 was 1620346, checked in by Kris Moore <kris@…>, 17 months ago

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100755
File size: 2.3 KB
Line 
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
33# Check if we are booting in LIVE or INSTALL mode
34if [ -e "/usr/pcbsd-live" ]; then
35
36  # Check if we should be going to the console instead of X directly
37  /sbin/sysctl kern.module_path | /usr/bin/grep "CONSOLE" >/dev/null 2>/dev/null
38  FOUND="$?"
39  if [ "$FOUND" = "0" ]
40  then
41    /root/PCBSDtext.sh
42    shutdown -r now
43    exit
44  fi
45
46  # We are running LIVE mode, start that script now
47  sh /root/PCBSDStartLive.sh
48  exit 0
49fi
50
51# Source our functions
52. /root/functions.sh
53
54# Check if we have an auto-install directive
55if [ -e "/tmp/pc-autoinstall.conf" ]
56then
57  # Start the parser on this directive and begin the install
58  /usr/sbin/pc-sysinstall start-autoinstall /tmp/pc-autoinstall.conf
59fi
60
61# Run the intial sorting of directories
62mv /root/.fluxbox /memfs/
63ln -s /memfs/.fluxbox /root/.fluxbox
64
65# Create the .qt directory
66mkdir /tmp/.qt
67mkdir /tmp/xkb
68
69# Check if we should be going to the console instead of X directly
70/sbin/sysctl kern.module_path | /usr/bin/grep "CONSOLE" >/dev/null 2>/dev/null
71FOUND="$?"
72if [ "$FOUND" = "0" ]
73then
74  /root/PCBSDtext.sh
75  shutdown -r now
76  exit
77fi
78
79# Now run the X auto-detection
80detect_x
81
82# Now start xorg
83start_xorg
84
85# Check if we had a successful SysInstaller exit
86if [ -e "/root/.exitStatus" ] ; then
87  STATUS="`cat /root/.exitStatus`"
88  if [ "$STATUS" = "0" ] ; then
89    shutdown -r now
90  else
91    echo "Installation failed! Press any key to drop to shell or type 'reboot' to restart the system"
92    read tmp
93    if [ "$tmp" = "reboot" ] ; then
94      shutdown -r now
95    else
96      /bin/sh
97    fi
98  fi
99fi
Note: See TracBrowser for help on using the repository browser.