correctly check for rootfs url
This commit is contained in:
parent
f8d5462eb2
commit
6969d896cd
2 changed files with 3 additions and 3 deletions
|
@ -21,7 +21,7 @@ with only SSH!
|
|||
* Linux kernel: overlayfs and tmpfs support
|
||||
* systemd
|
||||
* squashfs-tools
|
||||
* wget
|
||||
* curl
|
||||
|
||||
## Usage
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ confirm() {
|
|||
}
|
||||
|
||||
get_rootfs() {
|
||||
if [ -z ${ROOTFS+x} ]; then
|
||||
if [ -n ${ROOTFS} ]; then
|
||||
echo "Getting rootfs URL..."
|
||||
ROOTFS_TIME=$(curl "https://uk.images.linuxcontainers.org/images/debian/stretch/amd64/default/?C=M;O=D" | grep "folder.gif" | head -n 1 | cut -d'>' -f7 | cut -d'/' -f1)
|
||||
ROOTFS="https://images.linuxcontainers.org/images/debian/stretch/amd64/default/${ROOTFS_TIME}/rootfs.squashfs"
|
||||
|
@ -59,7 +59,7 @@ prepare_environment() {
|
|||
mkdir -p "${WORKDIR}/overlayfs_workdir"
|
||||
|
||||
echo "Downloading temporary rootfs..."
|
||||
wget -c "${ROOTFS}" -O "${WORKDIR}/rootfs.squashfs"
|
||||
curl -LC -o "${WORKDIR}/rootfs.squashfs" - "${ROOTFS}"
|
||||
}
|
||||
|
||||
mount_new_rootfs() {
|
||||
|
|
Loading…
Reference in a new issue