mirror of
https://git.launchpad.net/livecd-rootfs
synced 2025-04-16 21:51:18 +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
live-build
ubuntu-core/hooks
01-divert-grub-install.chroot_early12-add-foreign-libc6.chroot16-ensure-uboot.chroot99-undivert-grub-install.chroot
ubuntu-cpc/hooks
ubuntu-touch/hooks
@ -1,5 +1,7 @@
|
||||
#!/bin/sh -ex
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
|
||||
case $ARCH in
|
||||
i386|amd64)
|
||||
dpkg-divert --quiet --add \
|
||||
|
@ -4,7 +4,7 @@ set -ex
|
||||
|
||||
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"
|
||||
dpkg --add-architecture i386
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
case $ARCH in
|
||||
case "$(dpkg --print-architecture)" in
|
||||
arm*)
|
||||
mkdir -p /boot/uboot
|
||||
cat > /etc/fw_env.config <<EOF
|
||||
|
@ -1,5 +1,7 @@
|
||||
#! /bin/sh -ex
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
|
||||
case $ARCH in
|
||||
i386|amd64)
|
||||
rm -f /usr/sbin/grub-install
|
||||
|
@ -1,6 +1,8 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
ARCH=$(dpkg --print-architecture)
|
||||
|
||||
dpkg-divert --quiet --add --divert /bin/sync.REAL --rename /bin/sync
|
||||
cat > /bin/sync <<'EOF'
|
||||
#! /bin/sh
|
||||
|
@ -18,6 +18,8 @@ _xchroot() {
|
||||
}
|
||||
|
||||
#### COMMON architecture independent functions
|
||||
arch=$(_xchroot "${rootd}" dpkg --print-architecture)
|
||||
|
||||
add_serial_console() {
|
||||
condev=$1
|
||||
idir="$rootd/etc/init"
|
||||
@ -125,7 +127,7 @@ fi
|
||||
#### END COMMON ARCH FUNCTIONS
|
||||
|
||||
|
||||
case $ARCH in
|
||||
case $arch in
|
||||
# ARM images are special
|
||||
armhf|arm64)
|
||||
echo "Configuring ARM Serial Port"
|
||||
|
@ -20,10 +20,12 @@ tmpdir="$(mktemp -d)"
|
||||
cleanup () { rm -rf "$tmpdir"; }
|
||||
trap cleanup EXIT
|
||||
|
||||
CLICKARCH=$(dpkg --print-architecture)
|
||||
|
||||
wget --no-verbose -O "$tmpdir/click_list" "$click_list"
|
||||
for package in $(cat "$tmpdir/click_list")
|
||||
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"
|
||||
wget --no-verbose -O "$tmpdir/$package" "$click_uri/$package"
|
||||
# FIXME: first attempt, a hard-coded list of the packages that go to
|
||||
|
Loading…
x
Reference in New Issue
Block a user