wok-tiny rev 159
Add geninitramfs & busybox-net (again)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Feb 28 18:25:15 2020 +0100 (2020-02-28) |
parents | 2ecf107b3ad9 |
children | 562a49ca00d9 |
files | busybox-net/receipt busybox/receipt busybox/stuff/busybox-git.config geninitramfs/receipt geninitramfs/stuff/geninitramfs |
line diff
1.1 --- a/busybox-net/receipt Fri Feb 28 17:08:39 2020 +0100 1.2 +++ b/busybox-net/receipt Fri Feb 28 18:25:15 2020 +0100 1.3 @@ -85,7 +85,7 @@ 1.4 etc/inetd.conf etc/host.conf etc/hosts ; do 1.5 cp -a $WOK/base-tiny/stuff/$i $fs/$i 1.6 done 1.7 - sed '/hostname/{Nd}' -i etc/init.d/network.sh 1.8 + sed '/hostname/{Nd}' -i $fs/etc/init.d/network.sh 1.9 1.10 # Busybox config files. 1.11 touch $fs/etc/resolv.conf 1.12 @@ -112,7 +112,6 @@ 1.13 config_form() 1.14 { 1.15 if [ -z "$MODE" ]; then 1.16 - [ -n "$HOSTNAME" ] || HOSTNAME=slitaz 1.17 [ -n "$INTERFACE" ] || INTERFACE=eth0 1.18 [ -n "$IP" ] || IP=192.168.0.6 1.19 [ -n "$NETMASK" ] || NETMASK=255.255.255.0 1.20 @@ -122,10 +121,6 @@ 1.21 cat <<EOT 1.22 <table> 1.23 <tr> 1.24 -<td>Host name</td> 1.25 -<td><input type="text" name="HOSTNAME" value="$HOSTNAME" /></td> 1.26 -</tr> 1.27 -<tr> 1.28 <td>Interface</td> 1.29 <td><input type="text" name="INTERFACE" value="$INTERFACE" /></td> 1.30 </tr>
2.1 --- a/busybox/receipt Fri Feb 28 17:08:39 2020 +0100 2.2 +++ b/busybox/receipt Fri Feb 28 18:25:15 2020 +0100 2.3 @@ -90,11 +90,9 @@ 2.4 ln -s daemon $fs/etc/init.d/$i 2.5 done 2.6 sed -i 's|network.sh ||' $fs/etc/rcS.conf 2.7 - sed -i 's|Executing all initialization scripts.*|&\ 2.8 - # Set hostname\ 2.9 - echo -n "Setting hostname..."\ 2.10 - hostname -F /etc/hostname\ 2.11 - status\n|' $fs/etc/init.d/rcS 2.12 + sed -i 's|.*Executing all initialization scripts|echo -n "Setting hostname..."\ 2.13 +hostname -F /etc/hostname\ 2.14 +status\n&|' $fs/etc/init.d/rcS 2.15 rm -f $fs/etc/init.d/network.sh $fs/etc/network.conf \ 2.16 $fs/etc/services $fs/etc/networks $fs/etc/inetd.conf \ 2.17 $fs/etc/host.conf $fs/etc/hosts 2.18 @@ -111,14 +109,13 @@ 2.19 2.20 config_form() 2.21 { 2.22 - if [ -z "$BBCONF" ]; then 2.23 + if [ -z "$BBHOST" ]; then 2.24 [ -n "$PASSWORD" ] || PASSWORD=root 2.25 [ -n "$BBHOST" ] || BBHOST=slitaz 2.26 [ -n "$FSTAB" ] || FSTAB='/dev/hda1 /mnt ext3 defaults 0 2' 2.27 [ -n "$RC_LOCAL" ] || RC_LOCAL='[ -x /mnt/boot/init ] && /mnt/boot/init' 2.28 fi 2.29 cat <<EOT 2.30 -<input type="hidden" name="BBCONF" value="done" /> 2.31 <table> 2.32 <tr> 2.33 <td>Root password (empty=disable)</td> 2.34 @@ -195,7 +192,7 @@ 2.35 grep -qs ^root:: /etc/passwd /etc/shadow && passwd 2.36 EOT 2.37 fi 2.38 - [ -n "$HOSTNAME" ] && echo $HOSTNAME > $1/etc/hostname 2.39 + [ -n "$BBHOST" ] && echo $BBHOST > $1/etc/hostname 2.40 [ -n "$FSTAB" ] && dos2unix >> $1/etc/fstab <<EOT 2.41 $FSTAB 2.42 EOT
3.1 --- a/busybox/stuff/busybox-git.config Fri Feb 28 17:08:39 2020 +0100 3.2 +++ b/busybox/stuff/busybox-git.config Fri Feb 28 18:25:15 2020 +0100 3.3 @@ -404,7 +404,7 @@ 3.4 # CONFIG_FEATURE_DIFF_DIR is not set 3.5 # CONFIG_ED is not set 3.6 # CONFIG_PATCH is not set 3.7 -# CONFIG_SED is not set 3.8 +CONFIG_SED=y 3.9 CONFIG_VI=y 3.10 CONFIG_FEATURE_VI_MAX_LEN=1024 3.11 # CONFIG_FEATURE_VI_8BIT is not set
4.1 --- a/geninitramfs/receipt Fri Feb 28 17:08:39 2020 +0100 4.2 +++ b/geninitramfs/receipt Fri Feb 28 18:25:15 2020 +0100 4.3 @@ -7,7 +7,6 @@ 4.4 MAINTAINER="pascal.bellard@slitaz.org" 4.5 LICENSE="BSD" 4.6 WEB_SITE="http://tiny.slitaz.org/" 4.7 -DEPENDS="busybox-net" # sed 4.8 4.9 # Rules to gen a SliTaz package suitable for Tazpkg. 4.10 genpkg_rules()
5.1 --- a/geninitramfs/stuff/geninitramfs Fri Feb 28 17:08:39 2020 +0100 5.2 +++ b/geninitramfs/stuff/geninitramfs Fri Feb 28 18:25:15 2020 +0100 5.3 @@ -1,10 +1,10 @@ 5.4 #!/bin/sh 5.5 5.6 mkdir -p /boot/fs$$/bin /boot/fs$$/lib /boot/fs$$/proc /boot/fs$$/mnt 5.7 -cp -a /lib/modules /boot/fs$$/lib 5.8 -cp -a /bin/busybox /boot/fs$$/bin 5.9 +cp -dpR /lib/modules /boot/fs$$/lib 5.10 +cp -p /bin/busybox /boot/fs$$/bin 5.11 ln /boot/fs$$/bin/busybox /boot/fs$$/bin/sh 5.12 -cp -a /lib/ld* /lib/libc.so* /lib/libuClibc* /lib/libcrypt* /boot/fs$$/lib 5.13 +cp -d /lib/ld* /lib/libc.so* /lib/libuClibc* /lib/libcrypt* /boot/fs$$/lib 5.14 sed -i 's|^LOAD_MODULES=.*|# &|' /etc/rcS.conf 5.15 sed '/LOAD_MODULES/!d;s|^# ||' /etc/rcS.conf > /boot/fs$$/vars 5.16 . /boot/fs$$/vars 5.17 @@ -19,7 +19,7 @@ 5.18 modprobe \${mod//|/ } 5.19 done 5.20 echo 5.21 -mount \$(blkid | sed "/\$root/!d;s|: .*||") /mnt 5.22 +mount \$(blkid | sed "/${1:-\$root}/!d;s|: .*||") /mnt 5.23 umount /proc 5.24 switch_root /mnt /init 5.25 EOT