Deleted Added
full compact
functions-upgrade.sh (211730) functions-upgrade.sh (218960)
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
1#!/bin/sh
2#-
3# Copyright (c) 2010 iXsystems, Inc. All rights reserved.
4#
5# Redistribution and use in source and binary forms, with or without
6# modification, are permitted provided that the following conditions
7# are met:
8# 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24# SUCH DAMAGE.
25#
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh 211730 2010-08-24 06:11:46Z imp $
26# $FreeBSD: head/usr.sbin/pc-sysinstall/backend/functions-upgrade.sh 218960 2011-02-22 19:37:12Z jpaetzel $
27
28# Functions which perform the mounting / unmount for upgrades
29
30. ${PROGDIR}/backend/functions-unmount.sh
31
32mount_target_slice()
33{
34 MPART="${1}"

--- 18 unchanged lines hidden (view full) ---

53
54 # Mount devfs in chroot
55 mount -t devfs devfs ${FSMNT}/dev
56
57 # Check if we have any ZFS partitions to mount
58 zfs mount -a
59
60 # Mount all the fstab goodies on disk
27
28# Functions which perform the mounting / unmount for upgrades
29
30. ${PROGDIR}/backend/functions-unmount.sh
31
32mount_target_slice()
33{
34 MPART="${1}"

--- 18 unchanged lines hidden (view full) ---

53
54 # Mount devfs in chroot
55 mount -t devfs devfs ${FSMNT}/dev
56
57 # Check if we have any ZFS partitions to mount
58 zfs mount -a
59
60 # Mount all the fstab goodies on disk
61 chroot ${FSMNT} /sbin/mount -a >>${LOGOUT} 2>>${LOGOUT}
61 chroot ${FSMNT} /sbin/mount -a -t nolinprocfs >>${LOGOUT} 2>>${LOGOUT
62 chroot ${FSMNT} umount /proc >/dev/null 2>/dev/null
63 chroot ${FSMNT} umount /compat/linux/proc >/dev/null 2>/dev/null
64
65 # Now before we start the upgrade, make sure we set our noschg flags
66 echo_log "Cleaning up old filesystem... Please wait..."
67 rc_halt "chflags -R noschg ${FSMNT}"
68
69 # Make backup copies of some files

--- 4 unchanged lines hidden (view full) ---

74
75 # Remove some old dirs
76 rm -rf ${FSMNT}/etc/rc.d >/dev/null 2>/dev/null
77
78 # If we are doing PC-BSD install, lets cleanup old pkgs on disk
79 if [ "$INSTALLTYPE" != "FreeBSD" ]
80 then
81 echo_log "Removing old packages, this may take a while... Please wait..."
62 chroot ${FSMNT} umount /proc >/dev/null 2>/dev/null
63 chroot ${FSMNT} umount /compat/linux/proc >/dev/null 2>/dev/null
64
65 # Now before we start the upgrade, make sure we set our noschg flags
66 echo_log "Cleaning up old filesystem... Please wait..."
67 rc_halt "chflags -R noschg ${FSMNT}"
68
69 # Make backup copies of some files

--- 4 unchanged lines hidden (view full) ---

74
75 # Remove some old dirs
76 rm -rf ${FSMNT}/etc/rc.d >/dev/null 2>/dev/null
77
78 # If we are doing PC-BSD install, lets cleanup old pkgs on disk
79 if [ "$INSTALLTYPE" != "FreeBSD" ]
80 then
81 echo_log "Removing old packages, this may take a while... Please wait..."
82 echo '#/bin/sh
82 echo '#!/bin/sh
83for i in `pkg_info -E \*`
84do
85 echo "Uninstalling package: ${i}"
86 pkg_delete -f ${i} >/dev/null 2>/dev/null
87done
88' >${FSMNT}/.cleanPkgs.sh
89 chmod 755 ${FSMNT}/.cleanPkgs.sh
90 chroot ${FSMNT} /.cleanPkgs.sh

--- 157 unchanged lines hidden ---
83for i in `pkg_info -E \*`
84do
85 echo "Uninstalling package: ${i}"
86 pkg_delete -f ${i} >/dev/null 2>/dev/null
87done
88' >${FSMNT}/.cleanPkgs.sh
89 chmod 755 ${FSMNT}/.cleanPkgs.sh
90 chroot ${FSMNT} /.cleanPkgs.sh

--- 157 unchanged lines hidden ---