mirror of
https://github.com/rancher/os.git
synced 2025-09-01 14:48:55 +00:00
Add tty and half way broken state handling
This commit is contained in:
@@ -13,6 +13,15 @@ mkdir -p ${BUILD} ${DIST}
|
||||
|
||||
busybox_install()
|
||||
{
|
||||
local conf=$1
|
||||
local bbconf=$2
|
||||
local target=$3
|
||||
|
||||
if [ "$#" = "2" ]; then
|
||||
target=$2
|
||||
bbconf=
|
||||
fi
|
||||
|
||||
apt-get update
|
||||
apt-get install -y build-essential wget libncurses5-dev unzip bc
|
||||
|
||||
@@ -22,11 +31,14 @@ busybox_install()
|
||||
tar xvjf ${ARTIFACTS}/${BUILDROOT}
|
||||
cd ${BUILDROOT/.tar.bz2//}
|
||||
|
||||
cp $1 .config
|
||||
cp $conf .config
|
||||
if [ -n "$bbconf" ]; then
|
||||
cp $bbconf package/busybox/
|
||||
fi
|
||||
make oldconfig
|
||||
make
|
||||
|
||||
cp output/images/rootfs.tar $2
|
||||
cp output/images/rootfs.tar $target
|
||||
}
|
||||
|
||||
write_base()
|
||||
@@ -74,6 +86,10 @@ run()
|
||||
echo -e "\nCOPY $1 /source/$1" >> ${DOCKER_FILE}
|
||||
echo -e "RUN /source/$1" >> ${DOCKER_FILE}
|
||||
fi
|
||||
|
||||
if [ "$RUN_EXEC" = "true" ]; then
|
||||
$1
|
||||
fi
|
||||
}
|
||||
|
||||
finish()
|
||||
|
@@ -10,7 +10,7 @@ mkdir -p ${BUILD}/initrd ${DIST}/artifacts
|
||||
echo Extracting ${ARTIFACTS}/os-base.tar.xz
|
||||
tar xJf ${ARTIFACTS}/os-base.tar.xz -C ${BUILD}
|
||||
|
||||
cp /etc/ssl/certs/ca-certificates.crt ${BUILD}/ca.crt
|
||||
cp /etc/ssl/certs/ca-certificates.crt ${BUILD}/initrd/ca.crt
|
||||
|
||||
rm -rf ${BUILD}/initrd/lib
|
||||
cp -rf ${BUILD}/dist/kernel/lib ${BUILD}/initrd
|
||||
|
@@ -1,6 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
exec respawn << EOF
|
||||
#if [ -t 1 ]; then
|
||||
#exec /bin/sh
|
||||
#else
|
||||
exec respawn << EOF
|
||||
/sbin/getty 115200 tty1
|
||||
/sbin/getty 115200 tty2
|
||||
/sbin/getty 115200 tty3
|
||||
@@ -8,3 +11,4 @@ exec respawn << EOF
|
||||
/sbin/getty 115200 tty5
|
||||
/sbin/getty 115200 tty6
|
||||
EOF
|
||||
#fi
|
||||
|
@@ -4,5 +4,5 @@ cd $(dirname $0)/..
|
||||
|
||||
source scripts/build-common
|
||||
|
||||
download a8e5925eab10a472af4b9326dc3ff1068fd56886 https://github.com/rancherio/os-base/releases/download/v0.0.1/os-base.tar.xz
|
||||
download 71d4f44964a23418715274729dce30f79f1914c5 https://github.com/rancherio/os-base/releases/download/v0.0.3/os-base.tar.xz
|
||||
download 1acbe869b32869bca5788373e8624a2957cbb380 https://github.com/ibuildthecloud/docker/releases/download/v1.5.0-rancher-2/docker-1.5.0
|
||||
|
Reference in New Issue
Block a user