You are not logged in.
I've made a little script based on RtroX's contribution (AUR). As the title suggests, the daemon adds a guest user, mounts a tmpfs directory in /home, then copies the permanent data stored at a different place formerly. When stopped, it copies back the specified files (if any) to the permanent storage, and unmounts the tmpfs. Next time you start it, you'll have the original state (except the specified files).
How to use it:
Install it from AUR.
By default it creates a user called 'guest' with password 'guest'. You may change the latter with passwd.
Start the daemon.
Log in as guest user.
Perform all of the configurations that you want with your software.
Run '/etc/rc.d/guestd-tmpfs init' to make the changes permanent.
Add a list of files (bash syntax, recursive) to /home/guest-permanent/.keep to set certain files to be kept updated after shut-down.
Add guestd-tmpfs to the DAEMONS array in /etc/rc.conf
Alternatively if you already have a guest home directory:
Do the above steps from 1 to 2.
Copy the contents of guest dir to /home/guest.
Run '/etc/rc.d/guestd-tmpfs init'.
Start the daemon.
Add guestd-tmpfs to the DAEMONS array in /etc/rc.conf
It's recommended to exclude .thumbnails and all kind of cache directories to keep booting times fast.
Feel free to ask if something is not working as intended. As you can see I'm not a native English speaker so if you find strange sentences please correct me.
Last edited by szbence (2011-12-16 21:01:29)
Offline
Daemon name is false in code.
This is patch.
--- guestd-tmpfs.orig 2011-12-16 23:06:31.000000000 +0200
+++ guestd-tmpfs 2012-04-03 15:31:09.200042526 +0300
@@ -37,7 +37,7 @@
chmod -R 770 $GUEST_DIR
chmod -R 550 $PERMA_DIR
stat_done
- add_daemon guestd
+ add_daemon guestd-tmpfs
else
echo "Permanent directory $PERM_DIR does not exist"
stat_fail
@@ -50,11 +50,11 @@
do_sync
umount $GUEST_DIR
stat_done
- rm_daemon guestd
+ rm_daemon guestd-tmpfs
else
echo "Failed to remove directory; $PERM_DIR and/or $GUEST_DIR does not exist or the latter is not a monted tmpfs filesystem"
stat_fail
- rm_daemon guestd
+ rm_daemon guestd-tmpfs
fi
;;
Offline