View Single Post
Old 02-21-2011, 05:32 PM   #25
Junior Member
ths began at the beginning.
Posts: 5
Karma: 10
Join Date: Feb 2011
Device: Kindle 3
That seems overly complicated, and still requires modifying the root filesystem. I would suggest instead:


case "$1" in
		# If custom keys are present and enabled, mount a
		# temporary filesystem over /etc/uks and copy the
		# custom keys there

		umount /etc/uks

		if [ -d $KEYS_DIR ] ; then
			mount -t tmpfs -o size=1M none /etc/uks &&
			cp -r $KEYS_DIR/* /etc/uks/

		exit 0

		umount /etc/uks
		exit 0

		echo "Usage: $0 {start|stop|restart}" >&2
		exit 1
To disable it, you'd simply rename the "keys" directory to "keys-disabled" or whatever.

Another idea would be to make symlinks in the tmpfs rather than copying the key files, which would allow the user to switch between hack and official keys without rebooting. It might not be a good idea to do official updates while the hack is enabled, though.
ths is offline   Reply With Quote