This commit is contained in:
lw-everestlinux 2022-08-22 23:29:22 -04:00
parent dfffba09e9
commit de17b95791
3 changed files with 77 additions and 3 deletions

View File

@ -157,7 +157,7 @@ printf "[ i ] Creating system directories...\n"
cat > ${EVEREST}/targetfs/etc/passwd << "EOF"
root::0:0:root:/root:/bin/ash
EOF
cat > ${CLFS}/targetfs/etc/group << "EOF"
cat > ${EVEREST}/targetfs/etc/group << "EOF"
root:x:0:
bin:x:1:
sys:x:2:
@ -251,8 +251,44 @@ printf "[ i ] Building the Linux kernel...\n"
printf "[ i ] Finished build of the Linux kernel...\n"
printf "[ i ] NOTE: Bootloader will need to be installed manually by the user (unless utilizing the bootloader of another system)\n"
printf "[ i ] GRUB can be installed through Glacier.\n"
wait 3
printf "[ i ] Bootstrapping Glacier package management system...\n"
cd ${EVEREST}/tmp
git clone https://git.everestlinux.org/EverestLinux/glacier
cd install
tar xvf glacier.tar.gz
cd src
chmod +x INSTALL.sh
./INSTALL.sh
cd ${EVEREST}/sources
printf "[ i ] Setting up bootscripts...\n"
tar -xvf master.tar.gz
cd bootscripts-embedded-master
make DESTDIR=${EVEREST}/targetfs install-bootscripts
printf "[ i ] Creating system files...\n"
printf "[ i ] It may be a good idea to review the following files after this script finishes:\n"
printf " /etc/mdev.conf\n"
printf " /etc/profile\n"
printf " /etc/inittab\n"
printf " /etc/hostname\n"
printf " /etc/hosts\n"
cd /home/everest/everest-install/scripts/sysfiles
cp mdev ${EVEREST}/targetfs/etc/mdev.conf
cp profile ${EVEREST}/targetfs/etc/profile
cp inittab ${EVEREST}/targetfs/etc/inittab
cp hostname ${EVEREST}/targetfs/etc/hostname
cp hosts ${EVEREST}/targetfs/etc/hosts
mkdir -pv ${EVEREST}/targetfs/etc/network/if-{post-{up,down},pre-{up,down},up,down}.d
mkdir -pv ${EVEREST}/targetfs/usr/share/udhcpc
cat > ${EVEREST}/targetfs/etc/network/interfaces << "EOF"
auto eth0
iface eth0 inet dhcp
EOF
cp default.script ${EVEREST}/targetfs/usr/share/udhcpc/default.script
chmod +x ${EVEREST}/targetfs/usr/share/udhcpc/default.script

View File

@ -0,0 +1,38 @@
#!/bin/sh
# udhcpc Interface Configuration
# Based on http://lists.debian.org/debian-boot/2002/11/msg00500.html
# udhcpc script edited by Tim Riker <Tim@Rikers.org>
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
[ -n "$subnet" ] && NETMASK="netmask $subnet"
case "$1" in
deconfig)
/sbin/ifconfig $interface 0.0.0.0
;;
renew|bound)
/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
if [ -n "$router" ] ; then
while route del default gw 0.0.0.0 dev $interface ; do
true
done
for i in $router ; do
route add default gw $i dev $interface
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo nameserver $i >> $RESOLV_CONF
done
;;
esac
exit 0

View File

@ -1,6 +1,6 @@
# Begin /etc/hosts (network card version)
127.0.0.1 localhost
192.168.1.1 [<HOSTNAME>.example.org] everest
192.168.1.1 everest.everestlinux.org everest
# End /etc/hosts (network card version)