#!/bin/sh . ${CIRROS_LIB:=/lib/cirros/shlib_cirros} || { echo "failed to read ${CIRROS_LIB}" 1>&2; exit 1; } Usage() { cat < "$tempf" && chmod 700 "$cur" || { error "failed to copy $cur to make executable"; rm -f "$tempf"; return 1; } "$cur" ret=$? debug 2 "$cur returned $ret" else ret=0 debug 1 "$cur was not '#!' or executable" fi [ $ret -eq 0 ] || failures=$(($failures+1)) done rm -f "$tempf" return $failures } cirros_userdata "$@" # vi: ts=4 noexpandtab