diff options
author | Javier Jardón <jjardon@gnome.org> | 2017-11-26 23:39:48 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2017-12-12 15:58:23 +0000 |
commit | 7df7f3b427739ff7d69da2ba218da0124822892c (patch) | |
tree | 843c75e9bede53862ab101d6a7bcd1da15a33c55 /extensions/image-package-example/common.sh.in | |
parent | 7aad5150f69da42b84994c353283db5daf8e967f (diff) | |
download | definitions-7df7f3b427739ff7d69da2ba218da0124822892c.tar.gz |
Remove all .morph files and files from the old format
Diffstat (limited to 'extensions/image-package-example/common.sh.in')
-rw-r--r-- | extensions/image-package-example/common.sh.in | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/extensions/image-package-example/common.sh.in b/extensions/image-package-example/common.sh.in deleted file mode 100644 index 9a7389a7..00000000 --- a/extensions/image-package-example/common.sh.in +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/false -# Script library to be used by disk-install.sh and make-disk-image.sh - -status(){ - echo "$@" -} - -info(){ - echo "$@" >&2 -} - -warn(){ - echo "$@" >&2 -} - -extract_rootfs(){ - tar -C "$1" -xf @@ROOTFS_TAR_PATH@@ . -} - -make_disk_image(){ - truncate --size "$1" "$2" -} - -format_disk(){ - local disk="$1" - mkfs.ext4 -F -L rootfs "$disk" -} - -install_fs_config(){ - local mountpoint="$1" - local rootdisk="${2-/dev/vda}" - cat >>"$mountpoint/etc/fstab" <<EOF -$rootdisk / ext4 rw,errors=remount-ro 0 0 -EOF - install -D -m 644 /proc/self/fd/0 "$mountpoint/boot/extlinux.conf" <<EOF -DEFAULT baserock -LABEL baserock -SAY Booting Baserock -LINUX /boot/vmlinuz -APPEND root=$rootdisk -EOF -} - -install_bootloader(){ - local disk="$1" - local mountpoint="$2" - dd if=@@IMAGE_DIR@@/mbr.bin conv=notrunc bs=440 count=1 of="$disk" - extlinux --install "$mountpoint/boot" -} - -loop_file(){ - losetup --show --find "$1" -} -unloop_file(){ - #losetup --detach "$1" - # unlooping handled by umount -d, for busybox compatibility - true -} - -temp_mount(){ - local mp="$(mktemp -d)" - if ! mount "$@" "$mp"; then - rmdir "$mp" - return 1 - fi - echo "$mp" -} -untemp_mount(){ - # Unmount and detach in one step for busybox compatibility - umount -d "$1" - rmdir "$1" -} |