source: scripts/target-scripts/target-lfs-bootscripts.sh@ 57d97a5

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since 57d97a5 was 617118d, checked in by Jim Gifford <clfs@…>, 19 years ago

r561@server (orig r559): root | 2005-06-05 02:38:49 -0700
Fixed Directory Structure

  • Property mode set to 100755
File size: 2.7 KB
Line 
1#!/bin/bash
2
3# cross-lfs target lfs bootscripts installation
4# ---------------------------------------------
5# $LastChangedBy$
6# $LastChangedDate$
7# $LastChangedRevision$
8# $HeadURL$
9#
10
11LOG="lfs-bootscripts.log"
12cd ${SRC}
13
14unpack_tarball lfs-bootscripts-${LFS_BS_VER}
15cd ${PKGDIR}
16
17# Following commented lines are for using the *old* lfs bootscripts package
18#cp -a rc.d sysconfig ${LFS}/etc
19#chown -R root:root ${LFS}/etc/rc.d ${LFS}/etc/sysconfig
20
21max_log_init lfs-bootscripts ${LFS_BS_VER} "target" ${INSTLOGS} ${LOG}
22make DESTDIR=${LFS} install \
23 > ${LOGFILE} 2>&1 &&
24echo " o Install OK" || barf
25
26if [ "Y" = "${USE_HOTPLUG}" ]; then
27 # check if this version of the bootscripts has an
28 # intall-hotplug target
29 grep ^install-hotplug: Makefile > /dev/null 2>&1 &&
30 {
31 make DESTDIR=${LFS} install-hotplug \
32 >> ${LOGFILE} 2>&1 &&
33 echo " o Install hotplug OK" || barf
34 }
35fi
36
37# Bootscript Configuration
38#--------------------------
39
40if [ ! "${USE_SYSROOT}" = "Y" ]; then
41 # The normal PATH won't find our TGT_TOOLS binaries; so use the default
42 # PATH we give in /etc/profile later.
43 sed -e 's/^export PATH=.*//' < lfs/init.d/functions \
44 > ${LFS}/etc/rc.d/init.d/functions
45fi
46
47# setup system clock settings
48test -f ${LFS}/etc/sysconfig/clock ||
49{
50 # hardware clock should be set to UTC
51 cat > ${LFS}/etc/sysconfig/clock << "EOF"
52# Begin /etc/sysconfig/clock
53UTC=1
54
55# End /etc/sysconfig/clock
56EOF
57}
58
59# TODO: Put these in plfs-config
60NET_HOSTNAME="asuka"
61NET_DOMAINNAME="pha.com.au"
62NET_IP=192.168.0.6
63NET_NETMASK=255.255.255.0
64NET_PREFIX=24
65NET_BCAST=192.168.0.255
66NET_GATEWAY=192.168.0.1
67NET_GATEWAY_IF=eth0
68
69test -f ${LFS}/etc/hosts ||
70{
71echo "127.0.0.1 localhost.localdomain localhost
72${NET_IP} ${NET_HOSTNAME}.${NET_DOMAINNAME} ${NET_HOSTNAME}" > ${LFS}/etc/hosts
73}
74
75test -f ${LFS}/etc/sysconfig/network ||
76{
77 echo "HOSTNAME=${NET_HOSTNAME}" > ${LFS}/etc/sysconfig/network
78
79# Following commented lines are for using the *old* lfs bootscripts package
80# test -z "${NET_GATEWAY}" ||
81# {
82# echo "GATEWAY=${NET_GATEWAY}
83#GATEWAY_IF=${NET_GATEWAY_IF}" >> ${LFS}/etc/sysconfig/network
84# }
85}
86
87# Following commented lines are for using the *old* lfs bootscripts package
88#test -f ${LFS}/etc/sysconfig/network-devices/ifconfig.${NET_GW_IF} ||
89#{
90# echo "ONBOOT=yes
91#SERVICE=static
92#IP=${NET_IP}
93#NETMASK=${NET_NETMASK}
94#BROADCAST=${NET_BCAST}" \
95# > ${LFS}/etc/sysconfig/network-devices/ifconfig.${NET_GW_IF}
96#}
97
98test -f ${LFS}/etc/sysconfig/network-devices/ifconfig.${NET_GW_IF} ||
99{
100 echo "ONBOOT=yes
101SERVICE=ipv4-static
102IP=${NET_IP}
103GATEWAY=${NET_GATEWAY}
104PREFIX=${NET_PREFIX}
105BROADCAST=${NET_BCAST}" \
106 > ${LFS}/etc/sysconfig/network-devices/ifconfig.${NET_GW_IF}
107}
108
Note: See TracBrowser for help on using the repository browser.