This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# make a filesystem.squashfs for use in casper liveCD/liveUSB images | |
# usage sudo ./do_squashfs rootdir | |
rm filesystem.squashfs | |
chroot $1 dpkg-query -W --showformat='${Package} ${Version}\n' > filesystem.manifest | |
mksquashfs $1 filesystem.squashfs | |
printf $(sudo du -sx --block-size=1 $1 | cut -f1) > filesystem.size |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# chroot into a rootfs for the same architecture | |
# usage: sudo ./do_chroot rootdir | |
echo chrooting into $1 | |
mkdir -p $1/proc | |
mkdir -p $1/sys | |
mkdir -p $1/dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# /etc shadow fields are as follows: | |
# user:passwd:lastchange:minage:maxage:warndays:inactiveperiod:expdate:reserved | |
# remove root password, change requirement, and age restrictions | |
sed -e 's/^root:[^:]*:[^:]*:[^:]*:[^:]*:/root:::::/' -i etc/shadow | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Backup a folder of to a Picasa album | |
if [ ! -n "$1" ] | |
then | |
echo "Backup a directory of photos to Google Picasa" | |
echo "Usage: `basename $0` Album_Directory/" | |
exit 1 | |
fi |