Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F115929170
D42281.id129049.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42281.id129049.diff
View Options
diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto
--- a/usr.sbin/bsdinstall/scripts/auto
+++ b/usr.sbin/bsdinstall/scripts/auto
@@ -90,6 +90,7 @@
--yes-label "$msg_restart" \
--yesno "$prompt" $height $width
then
+ environment_restore
exec $0
# NOTREACHED
fi
@@ -138,10 +139,26 @@
--yesno "$prompt" $height $width
}
+environment_restore()
+{
+ BSDINSTALL_DISTSITE="$ORIG_BSDINSTALL_DISTSITE"
+ DISTRIBUTIONS="$ORIG_DISTRIBUTIONS"
+ unset WORKAROUND_GPTACTIVE WORKAROUND_LENOVO
+ unset ZFSBOOT_PARTITION_SCHEME
+}
+
+environment_save()
+{
+ ORIG_BSDINSTALL_DISTSITE="$BSDINSTALL_DISTSITE"
+ ORIG_DISTRIBUTIONS="$DISTRIBUTIONS"
+}
+
############################################################ MAIN
f_dprintf "Began Installation at %s" "$( date )"
+environment_save
+
rm -rf $BSDINSTALL_TMPETC
mkdir $BSDINSTALL_TMPETC
diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail
--- a/usr.sbin/bsdinstall/scripts/jail
+++ b/usr.sbin/bsdinstall/scripts/jail
@@ -48,16 +48,30 @@
if [ $? -ne $BSDDIALOG_OK ]; then
exit
else
- [ -z "$MIRROR_BUTTON" ] || unset BSDINSTALL_DISTSITE
+ environment_restore
exec $0 $BSDINSTALL_CHROOT
fi
}
+environment_restore()
+{
+ BSDINSTALL_DISTSITE="$ORIG_BSDINSTALL_DISTSITE"
+ DISTRIBUTIONS="$ORIG_DISTRIBUTIONS"
+}
+
+environment_save()
+{
+ ORIG_BSDINSTALL_DISTSITE="$BSDINSTALL_DISTSITE"
+ ORIG_DISTRIBUTIONS="$DISTRIBUTIONS"
+}
+
if [ -z "$1" ]; then
error "Directory can not be empty\n\nUsage:\nbsdinstall jail directory"
fi
export BSDINSTALL_CHROOT=$1
+environment_save
+
rm -rf $BSDINSTALL_TMPETC
mkdir $BSDINSTALL_TMPETC
mkdir -p $1 || error "mkdir failed for $1"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 1, 1:12 PM (17 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17882140
Default Alt Text
D42281.id129049.diff (1 KB)
Attached To
Mode
D42281: bsdinstall: restore the environment when restarting
Attached
Detach File
Event Timeline
Log In to Comment