#!/bin/bash # This script runs on the live media, ie. outside of the chroot environment. # debian-live ensures that this is always at the same place, so we can just bind-mount it MEDIA="/run/live/medium" # More tricky, we need to figure out where calamares left us the chroot. # This seems to work reliably in all tested cases. CHROOT=$(mount | grep proc | grep calamares | awk '{print $3}' | sed -e "s#/proc##g") umount -l $CHROOT/media/installer rmdir $CHROOT/media/installer