add.sh (231B)
1 #!/bin/bash 2 3 E_BADARGS=65 4 if [ ! "$UID" == "0" ]; then 5 echo "[+] you need to be root!" 1>&2 6 exit 7 fi 8 if [ ! -n "$1" ]; then 9 echo "Usage: `basename $0` file" 1>&2 10 exit $E_BADARGS 11 fi 12 mount -o loop initrd mnt 13 cp $1 mnt/ 14 umount mnt