source: overlays/install-overlay/etc/pcbsd-rc.sh @ 1620346

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

Initial import of PC-BSD /current/ SVN repo

  • Property mode set to 100644
File size: 1.7 KB
Line 
1#!/bin/sh
2
3# Set shell to ignore SIGINT (2), but not children;
4trap : 2
5
6# Do a check of available memory 
7sysMem=`/sbin/sysctl hw.realmem | /bin/cut -d ' ' -f 2`
8minSize=`/bin/expr 250 \* 1024 \* 1024`
9if [ $sysMem -lt $minSize ] ; then
10        echo "Warning: PC-BSD requires a minimum of 256MB of RAM for optimal performance."
11        echo "You may experience problems with less than this ammount."
12        echo ""
13        echo "Press ENTER to continue"
14        read tmp
15fi
16
17# Load geom_uzip
18kldload geom_uzip
19
20# Create a /tmp file system with some extra space
21/sbin/mdmfs -S -s 10M -O space md6 /tmp
22
23# If we have a LIVE DVD image, boot with it
24if [ -e "/dist/PCBSD.ufs.uzip" ]
25then
26  MEM=`sysctl hw.realmem | /bin/cut -d " " -f 2`
27
28  # We are running in LIVE mode
29  sh /etc/SetupLive.sh
30else
31  # Installation medium ONLY
32
33  # Run integrity checks
34  /etc/IntegrityCheck.sh
35  if [ "$?" != "0" ]
36  then
37   echo "One or more integrity checks failed. This can indicate a corrupt
38installation medium. Please reburn your CD and check the md5 of your ISO
39against the md5 displayed on the PC-BSD site. To reboot press ENTER.
40To continue at your own peril type 'continue': "
41   read integrityResponse
42   if [ "$integrityResponse" != "continue" ]
43   then
44    /sbin/reboot
45   fi
46  fi
47 
48  # We are running a regular Install
49  sh /etc/SetupInstall.sh
50fi
51
52# Extract the etc-dist.txz
53/sbin/mdmfs -S -s 5M -O space md10 /etc
54/usr/bin/tar xvf /uzip/etc-dist.txz -C /etc >/dev/null 2>/dev/null
55
56# Extract the var-dist.txz
57/sbin/mdmfs -S -s 5M -O space md9 /var
58/usr/bin/tar xvf /uzip/var-dist.txz -C /var >/dev/null 2>/dev/null
59
60# Extract the root-dist.txz
61/sbin/mdmfs -S -s 15M -O space md8 /root
62/usr/bin/tar xvf /uzip/root-dist.txz -C /root >/dev/null 2>/dev/null
Note: See TracBrowser for help on using the repository browser.