]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - tools/tools/nanobsd/rescue/common
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / tools / tools / nanobsd / rescue / common
1 #
2 # $FreeBSD$
3 #
4 NANO_TOOLS=`pwd`
5 NANO_PACKAGE_DIR=`pwd`/Pkg
6 NANO_RAM_TMPVARSIZE=20480
7 NANO_PMAKE="make -j 8"
8
9 # Options to put in make.conf during buildworld only
10 CONF_BUILD='
11 '
12 # Options to put in make.conf during installworld only                          
13 CONF_INSTALL='
14 '
15 # Options to put in make.conf during both build- & installworld.                
16 CONF_WORLD='                                                                    
17 #TARGET_ARCH=i386
18 CFLAGS=-O -pipe                                                                
19 #MODULES_OVERRIDE=
20 '
21
22 #customize_cmd cust_comconsole
23 customize_cmd cust_allow_ssh_root
24 customize_cmd cust_install_files
25
26 cust_ld32_cfg () (
27         cd ${NANO_WORLDDIR}/libexec
28         if [ \! -f ld-elf32.so.1 ]; then
29         ln -s ld-elf.so.1 ld-elf32.so.1
30         fi
31 )
32 customize_cmd cust_ld32_cfg
33
34 #cust_boot_cfg () (
35 #       cd ${NANO_WORLDDIR}
36 #       echo "-S115200 -h" > boot.config
37 #       echo "console=\"comconsole\"" > boot/loader.conf
38 #       echo "comconsole_speed=\"115200\"" >> boot/loader.conf
39 #       echo "hint.acpi.0.disabled=\"1\"" >> boot/loader.conf
40 #)
41 #customize_cmd cust_boot_cfg
42
43 customize_cmd cust_pkg
44
45 cust_etc_cfg () (
46   cd ${NANO_WORLDDIR}
47 #  mkdir -pv scratch
48         echo "hostname=\"rescue\"" > etc/rc.conf
49         echo "font8x14=\"iso15-8x14\"" >> etc/rc.conf
50         echo "font8x16=\"iso15-8x16\"" >> etc/rc.conf
51         echo "font8x8=\"iso15-8x8\"" >> etc/rc.conf
52         echo "keymap=\"german.iso\"" >> etc/rc.conf
53         echo "#ifconfig_fxp0=\"AUTO\"" >> etc/rc.conf
54         echo "#sshd_enable=\"YES\"" >> etc/rc.conf
55         echo "/dev/acd0 / cd9660 ro 0 0" > etc/fstab
56         echo "tmpfs /tmp tmpfs rw,size=268435456,mode=1777 0 0" >> etc/fstab
57         echo "ports:/usr/ports /usr/ports nfs rw,noauto,noatime,bg,soft,intr,nfsv3 0 0" >> etc/fstab
58 #       echo "/dev/ad1s1a /scratch ufs rw,noauto,noatime 0 0" >> etc/fstab
59         /usr/sbin/pwd_mkdb -d etc etc/master.passwd
60 )
61 customize_cmd cust_etc_cfg
62
63 setup_nanobsd_etc ( ) (
64         pprint 2 "configure nanobsd /etc"
65         (
66         cd ${NANO_WORLDDIR}
67         # create diskless marker file
68         touch etc/diskless
69         # Make root filesystem R/O by default
70         echo "root_rw_mount=NO" >> etc/defaults/rc.conf
71         # save config file for scripts
72         echo "NANO_DRIVE=${NANO_DRIVE}" > etc/nanobsd.conf
73         mkdir -p cfg
74         )
75 )
76 last_orders () (
77         pprint 2 "last orders"
78         (
79         cd ${NANO_WORLDDIR}
80         rm -f conf/default/etc/remount
81         touch conf/default/etc/.keepme
82         touch conf/default/var/.keepme
83         cd ..
84         mkisofs -quiet -r -J -no-emul-boot -b boot/cdboot -o _.disk.iso _.w/
85         )
86 )
87