Hitchhiker's Guide to Openbsd


Download 1.27 Mb.
Pdf ko'rish
bet62/258
Sana04.04.2023
Hajmi1.27 Mb.
#1328980
1   ...   58   59   60   61   62   63   64   65   ...   258
Bog'liq
obsd-faq49

install.site
/
upgrade.site
 scripts
As the last step in the install/upgrade process, the scripts look in the root directory of the newly installed/upgraded system 
for 
install.site
or 
upgrade.site
, as appropriate to the current process, and runs this script in an environment 
chroot
ed to the installed/upgraded system's root. Remember, the upgrade is done from a booted file system, so your target 
file system is actually mounted on 
/mnt
. However, because of the chroot, your script can be written as if it is running in 
the "normal" root of your file system. Since this script is run after all the files are installed, you have much of the 
functionality of the full system when your script runs. Keep in mind that you are running a minimal kernel, not all 
features are available, and due to space constraints, things that work today may not work in a future release. 
Note that the 
install.site
script would have to be in a 
siteXX.tgz file
, while the 
upgrade.site
script 
could be put in the root directory before the upgrade, or could be put in a 
siteXX.tgz
file. 
The scripts can be used to do many things: 

Remove files that are installed/upgraded that you don't want present on the system. 

Remove/upgrade/install the 
packages
 you want on the installed system (may not work for all packages!). 

Do an 
immediate backup/archive
 of the new system before you expose it to the rest of the world. 

Use 
rdate(8)
to set the system time. 

Have a set of arbitrary commands be run after the first boot. This will happen if install.site is used to append any 
http://www.openbsd.org/faq/faq4.html (41 of 43)9/4/2011 10:01:58 AM


4 - OpenBSD 4.9 Installation Guide
such commands to an 
rc.firsttime(8)
file (appending to this file is neccessary since the installer itself may write to 
this file). At boot time, rc.firsttime is executed once then deleted. 
The combination of 
siteXX.tgz
and 
install.site/upgrade.site
files is intended to give users broad 
customization capabilities without having to build their own custom install sets. 
Note: if you will be doing your install from an http server, you will need to add your 
site*.tgz
file(s) to the file 
index.txt
in the source directory in order for them to be listed as an option at install time. This is not needed for FTP 
or other installs. 

Download 1.27 Mb.

Do'stlaringiz bilan baham:
1   ...   58   59   60   61   62   63   64   65   ...   258




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling