Browse Source

Initial commit

master
Olivier DOSSMANN 5 years ago
commit
caa6c95cc8
  1. 2
      .gitignore
  2. 23
      install-and-chroot.sh

2
.gitignore

@ -0,0 +1,2 @@
alpine-chroot-install
alpine/*

23
install-and-chroot.sh

@ -0,0 +1,23 @@
#!/usr/bin/env sh
alpine_install='alpine-chroot-install'
alpine_directory='alpine'
# DL alpine install script
if ! test -f "$alpine_install"; then
wget https://raw.githubusercontent.com/alpinelinux/alpine-chroot-install/v0.6.0/alpine-chroot-install -O "$alpine_install" \
&& echo 'a827a4ba3d0817e7c88bae17fe34e50204983d1e alpine-chroot-install' | sha1sum -c \
|| exit 1
chmod +x "$alpine_install"
fi
# Install Alpine
if ! test -d "./alpine"; then
sh ./$alpine_install
fi
# Set rc_sys="prefix" to not disturb systemd on current system
sudo sed -e 's/#rc_sys=""/rc_sys="prefix"/g' -i "$alpine_directory/etc/rc.conf"
# Launch chroot
sh ./$alpine_directory/enter-chroot
Loading…
Cancel
Save