mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-05-08 01:11:31 +00:00
chroot hooks are special, they don't get the environment because it gets scrubbed by rootcmd; so we have to call dpkg --print-architecture after all
This commit is contained in:
parent
b9f96f5682
commit
83d2176957
@ -1,5 +1,7 @@
|
|||||||
#!/bin/sh -ex
|
#!/bin/sh -ex
|
||||||
|
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
i386|amd64)
|
i386|amd64)
|
||||||
dpkg-divert --quiet --add \
|
dpkg-divert --quiet --add \
|
||||||
|
@ -4,7 +4,7 @@ set -ex
|
|||||||
|
|
||||||
echo "I: Checking if we are amd64 and libc6:i386 should be installed"
|
echo "I: Checking if we are amd64 and libc6:i386 should be installed"
|
||||||
|
|
||||||
if [ "$ARCH" = "amd64" ]; then
|
if [ "$(dpkg --print-architecture)" = "amd64" ]; then
|
||||||
echo "I: Enabling i386 multiarch support on amd64"
|
echo "I: Enabling i386 multiarch support on amd64"
|
||||||
dpkg --add-architecture i386
|
dpkg --add-architecture i386
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
case $ARCH in
|
case "$(dpkg --print-architecture)" in
|
||||||
arm*)
|
arm*)
|
||||||
mkdir -p /boot/uboot
|
mkdir -p /boot/uboot
|
||||||
cat > /etc/fw_env.config <<EOF
|
cat > /etc/fw_env.config <<EOF
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
#! /bin/sh -ex
|
#! /bin/sh -ex
|
||||||
|
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
i386|amd64)
|
i386|amd64)
|
||||||
rm -f /usr/sbin/grub-install
|
rm -f /usr/sbin/grub-install
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
ARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
dpkg-divert --quiet --add --divert /bin/sync.REAL --rename /bin/sync
|
dpkg-divert --quiet --add --divert /bin/sync.REAL --rename /bin/sync
|
||||||
cat > /bin/sync <<'EOF'
|
cat > /bin/sync <<'EOF'
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
@ -18,6 +18,8 @@ _xchroot() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#### COMMON architecture independent functions
|
#### COMMON architecture independent functions
|
||||||
|
arch=$(_xchroot "${rootd}" dpkg --print-architecture)
|
||||||
|
|
||||||
add_serial_console() {
|
add_serial_console() {
|
||||||
condev=$1
|
condev=$1
|
||||||
idir="$rootd/etc/init"
|
idir="$rootd/etc/init"
|
||||||
@ -125,7 +127,7 @@ fi
|
|||||||
#### END COMMON ARCH FUNCTIONS
|
#### END COMMON ARCH FUNCTIONS
|
||||||
|
|
||||||
|
|
||||||
case $ARCH in
|
case $arch in
|
||||||
# ARM images are special
|
# ARM images are special
|
||||||
armhf|arm64)
|
armhf|arm64)
|
||||||
echo "Configuring ARM Serial Port"
|
echo "Configuring ARM Serial Port"
|
||||||
|
@ -20,10 +20,12 @@ tmpdir="$(mktemp -d)"
|
|||||||
cleanup () { rm -rf "$tmpdir"; }
|
cleanup () { rm -rf "$tmpdir"; }
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
CLICKARCH=$(dpkg --print-architecture)
|
||||||
|
|
||||||
wget --no-verbose -O "$tmpdir/click_list" "$click_list"
|
wget --no-verbose -O "$tmpdir/click_list" "$click_list"
|
||||||
for package in $(cat "$tmpdir/click_list")
|
for package in $(cat "$tmpdir/click_list")
|
||||||
do
|
do
|
||||||
if echo $package | egrep -q "_$ARCH.click|_all.click|_unknown.click|_multi.click"; then
|
if echo $package | egrep -q "_$CLICKARCH.click|_all.click|_unknown.click|_multi.click"; then
|
||||||
echo "Setting up $package"
|
echo "Setting up $package"
|
||||||
wget --no-verbose -O "$tmpdir/$package" "$click_uri/$package"
|
wget --no-verbose -O "$tmpdir/$package" "$click_uri/$package"
|
||||||
# FIXME: first attempt, a hard-coded list of the packages that go to
|
# FIXME: first attempt, a hard-coded list of the packages that go to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user