mkimage-arch: unify usage of brackets around variables
Docker-DCO-1.1-Signed-off-by: Bartłomiej Piotrowski <b@bpiotrowski.pl> (github: Barthalion)
This commit is contained in:
parent
a4e6e9bd41
commit
c6535d272c
1 changed files with 16 additions and 16 deletions
|
@ -18,7 +18,7 @@ EXPECT=$(hash expect &>/dev/null)
|
||||||
|
|
||||||
ROOTFS=$(mktemp -d /tmp/rootfs-archlinux-XXXXXXXXXX)
|
ROOTFS=$(mktemp -d /tmp/rootfs-archlinux-XXXXXXXXXX)
|
||||||
|
|
||||||
#packages to ignore for space savings
|
# packages to ignore for space savings
|
||||||
PKGIGNORE=linux,jfsutils,lvm2,cryptsetup,groff,man-db,man-pages,mdadm,pciutils,pcmciautils,reiserfsprogs,s-nail,xfsprogs
|
PKGIGNORE=linux,jfsutils,lvm2,cryptsetup,groff,man-db,man-pages,mdadm,pciutils,pcmciautils,reiserfsprogs,s-nail,xfsprogs
|
||||||
|
|
||||||
expect <<EOF
|
expect <<EOF
|
||||||
|
@ -46,21 +46,21 @@ arch-chroot $ROOTFS locale-gen
|
||||||
arch-chroot $ROOTFS /bin/sh -c 'echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist'
|
arch-chroot $ROOTFS /bin/sh -c 'echo "Server = http://mirrors.kernel.org/archlinux/\$repo/os/\$arch" > /etc/pacman.d/mirrorlist'
|
||||||
|
|
||||||
# udev doesn't work in containers, rebuild /dev
|
# udev doesn't work in containers, rebuild /dev
|
||||||
DEV=${ROOTFS}/dev
|
DEV=$ROOTFS/dev
|
||||||
rm -rf ${DEV}
|
rm -rf $DEV
|
||||||
mkdir -p ${DEV}
|
mkdir -p $DEV
|
||||||
mknod -m 666 ${DEV}/null c 1 3
|
mknod -m 666 $DEV/null c 1 3
|
||||||
mknod -m 666 ${DEV}/zero c 1 5
|
mknod -m 666 $DEV/zero c 1 5
|
||||||
mknod -m 666 ${DEV}/random c 1 8
|
mknod -m 666 $DEV/random c 1 8
|
||||||
mknod -m 666 ${DEV}/urandom c 1 9
|
mknod -m 666 $DEV/urandom c 1 9
|
||||||
mkdir -m 755 ${DEV}/pts
|
mkdir -m 755 $DEV/pts
|
||||||
mkdir -m 1777 ${DEV}/shm
|
mkdir -m 1777 $DEV/shm
|
||||||
mknod -m 666 ${DEV}/tty c 5 0
|
mknod -m 666 $DEV/tty c 5 0
|
||||||
mknod -m 600 ${DEV}/console c 5 1
|
mknod -m 600 $DEV/console c 5 1
|
||||||
mknod -m 666 ${DEV}/tty0 c 4 0
|
mknod -m 666 $DEV/tty0 c 4 0
|
||||||
mknod -m 666 ${DEV}/full c 1 7
|
mknod -m 666 $DEV/full c 1 7
|
||||||
mknod -m 600 ${DEV}/initctl p
|
mknod -m 600 $DEV/initctl p
|
||||||
mknod -m 666 ${DEV}/ptmx c 5 2
|
mknod -m 666 $DEV/ptmx c 5 2
|
||||||
|
|
||||||
tar --numeric-owner -C $ROOTFS -c . | docker import - archlinux
|
tar --numeric-owner -C $ROOTFS -c . | docker import - archlinux
|
||||||
docker run -i -t archlinux echo Success.
|
docker run -i -t archlinux echo Success.
|
||||||
|
|
Loading…
Reference in a new issue