#!/bin/bash if [ $(id -u) != "0" ]; then echo "This script must be run as root" 1>&2 exit 1 fi builddate="$(date +%Y%m%d).graphite" builddir="build-$(date +%Y%m%d)" cd $builddir if [[ -z $(findmnt image/proc) ]]; then mount -t proc none image/proc mount --rbind /dev image/dev mount --rbind /sys image/sys else echo "proc already mounted..." fi cd image/ cat <