ssfs rev 66

Add some doc and few small fixes
author Christophe Lincoln <pankso@slitaz.org>
date Mon Jun 13 18:30:46 2011 +0200 (2011-06-13)
parents aa620b69c929
children 3498e1a1bab7
files Makefile README ssfs ssfs-server web/ssfs.cgi
line diff
     1.1 --- a/Makefile	Mon Jun 13 17:34:45 2011 +0200
     1.2 +++ b/Makefile	Mon Jun 13 18:30:46 2011 +0200
     1.3 @@ -18,15 +18,16 @@
     1.4  		$(DESTDIR)/var/lib/$(PACKAGE) \
     1.5  		$(DESTDIR)$(PREFIX)/share/applications \
     1.6  		$(DESTDIR)$(PREFIX)/share/pixmaps \
     1.7 -		$(DESTDIR)$(PREFIX)/share/$(PACKAGE)
     1.8 +		$(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin
     1.9  	install -m 0755 $(PACKAGE)-sh $(DESTDIR)/bin
    1.10  	install -m 0755 $(PACKAGE) $(DESTDIR)$(PREFIX)/bin
    1.11  	install -m 0755 $(PACKAGE)-box $(DESTDIR)$(PREFIX)/bin
    1.12  	install -m 0755 $(PACKAGE)-server $(DESTDIR)$(PREFIX)/sbin
    1.13 -	install -m 0755 $(PACKAGE)-env $(DESTDIR)$(PREFIX)/share/$(PACKAGE)
    1.14  	install -m 0644 README $(DESTDIR)$(DOCDIR)/$(PACKAGE)
    1.15  	install -m 0644 data/$(PACKAGE)-server.conf $(DESTDIR)/etc/$(PACKAGE)
    1.16  	install -m 0644 data/$(PACKAGE).png $(DESTDIR)$(PREFIX)/share/pixmaps
    1.17  	install -m 0644 data/$(PACKAGE).desktop \
    1.18  		$(DESTDIR)$(PREFIX)/share/applications
    1.19 +	install -m 0755 $(PACKAGE)-env \
    1.20 +		$(DESTDIR)$(PREFIX)/share/$(PACKAGE)/rootfs/bin
    1.21  	touch $(DESTDIR)/var/lib/$(PACKAGE)/vdisk.files
     2.1 --- a/README	Mon Jun 13 17:34:45 2011 +0200
     2.2 +++ b/README	Mon Jun 13 18:30:46 2011 +0200
     2.3 @@ -78,6 +78,13 @@
     2.4  
     2.5  $ ssfs setup --login=user --host=server
     2.6  
     2.7 +Once the client is setup you can synchronize from the server and start live
     2.8 +sync. You can also get quick access to your files and ssfs info with a nice
     2.9 +startup icon in the desktop panel. To sync and start Ssfs notify:
    2.10 +
    2.11 +$ ssfs sync
    2.12 +$ ssfs-box notify &
    2.13 +
    2.14  
    2.15  GUI & Web interface
    2.16  -------------------
    2.17 @@ -88,6 +95,9 @@
    2.18  the files. We may implement a HTTP Public dir which could handle xHTML pages, a
    2.19  wiki, etc.
    2.20  
    2.21 +The GTK gui provide a notification mode as explained previewsly and the mian
    2.22 +window can be started from the standard menu and under the Metwork category.
    2.23 +
    2.24  
    2.25  Ssfs chroot SHell
    2.26  -----------------
    2.27 @@ -137,6 +147,23 @@
    2.28  
    2.29  # ssfs-server help
    2.30  
    2.31 +Vdisk chroot system can be extended if you want to provide more commands to
    2.32 +users. The minimal SliTaz chroot is easily maintainable and builded using
    2.33 +standard SliTaz packages. The package ssfs-busybox provide the minimal base
    2.34 +commands such as ls, cp, mc, cat, grep and have no dependencies since we just
    2.35 +need a few shared libs in /lib. Ssfs original chroot files are stored in the
    2.36 +directory /usr/share/ssfs/rootfs. The virtual disk contain a Linux jounalized
    2.37 +ext3 filesystem that you can check and verify with:
    2.38 +
    2.39 +# ssfs-server check-vdisk
    2.40 +
    2.41 +In a production environment dont forget to mount Ssfs vdisk on boot via fstab.
    2.42 +For maitainance purpose you can manually mount or unmount the disk and also
    2.43 +update it in a command, example:
    2.44 +
    2.45 +# ssfs-server mount-vdisk
    2.46 +# ssfs-server up-vdisk
    2.47 +
    2.48  
    2.49  Ssfs virtual disk
    2.50  -----------------
     3.1 --- a/ssfs	Mon Jun 13 17:34:45 2011 +0200
     3.2 +++ b/ssfs	Mon Jun 13 18:30:46 2011 +0200
     3.3 @@ -127,7 +127,7 @@
     3.4  				sed -e "/^$/"d -e "/^.\/$/"d
     3.5  		
     3.6  		# Monitor local folder if not yet running.
     3.7 -		if [ ! -f "$pid" ]; then
     3.8 +		if [ ! -s "$pid" ]; then
     3.9  			gettext "Starting lsyncd daemon..."
    3.10  			lsyncd -pidfile $pid -log all -logfile $logdir/lsyncd.log $config
    3.11  		else
     4.1 --- a/ssfs-server	Mon Jun 13 17:34:45 2011 +0200
     4.2 +++ b/ssfs-server	Mon Jun 13 18:30:46 2011 +0200
     4.3 @@ -115,7 +115,7 @@
     4.4  
     4.5  vdisk_config() {
     4.6  	cat > $root/etc/vdisk.conf << EOT
     4.7 -# /etc/vdisk.conf: Ssfs virtual auto-generated config file.
     4.8 +# /etc/vdisk.conf: Ssfs virtual disk auto-generated config file.
     4.9  
    4.10  VDATE="$date"
    4.11  VSIZE="$size"
    4.12 @@ -271,17 +271,12 @@
    4.13  		cp -f /etc/slitaz-release $root/etc
    4.14  		if [ ! -f "$root/etc/passwd" ]; then
    4.15  			echo "root:x:0:0:root:/root:/bin/sh" > $root/etc/passwd
    4.16 -			#echo "root::13525:0:99999:7:::" > $root/etc/shadow
    4.17  			echo "root:x:0:" > $root/etc/group
    4.18 -			#echo "root:*::" > $root/etc/gshadow
    4.19  		fi
    4.20 -
    4.21 -		# /dev nodes.
    4.22 -		#mknod -m 666 $root/dev/null c 1 3
    4.23 -
    4.24 -		# Ssfs Busybox package install files in $cache and allow easy vdisk
    4.25 +		
    4.26 +		# Ssfs Busybox package install files in $share and allow easy vdisk
    4.27  		# upgrade following SliTaz repo.
    4.28 -		gettext "Installing Ssfs Busybox..."
    4.29 +		gettext "Installing Ssfs root filesystem..."
    4.30  		cp -a $rootfs/* $root
    4.31  		status
    4.32  
    4.33 @@ -300,9 +295,8 @@
    4.34  		done && status
    4.35  		
    4.36  		# Ssfs chroot SHell and declare vdisk config.
    4.37 -		gettext "Installing Ssfs SHell and utility..."
    4.38 +		gettext "Installing Ssfs SHell..."
    4.39  		install -m 0755 /bin/ssfs-sh $root/bin
    4.40 -		install -m 0755 $share/ssfs-env $root/bin
    4.41  		touch $root/etc/vdisk.conf
    4.42  		status
    4.43  
     5.1 --- a/web/ssfs.cgi	Mon Jun 13 17:34:45 2011 +0200
     5.2 +++ b/web/ssfs.cgi	Mon Jun 13 18:30:46 2011 +0200
     5.3 @@ -4,6 +4,7 @@
     5.4  echo ""
     5.5  
     5.6  . /etc/ssfs/ssfs-server.conf
     5.7 +export TZ=$(cat /etc/TZ)
     5.8  
     5.9  notes=/var/lib/ssfs/notes
    5.10  root=$SSFS_CHROOT
    5.11 @@ -14,8 +15,6 @@
    5.12  pct=$(df $root | fgrep $root | awk '{print $5}')
    5.13  date=$(date "+%Y-%m-%d %H:%M")
    5.14  
    5.15 -export TZ=$(cat /etc/TZ)
    5.16 -
    5.17  # XHTML footer function.
    5.18  xhtml_footer() {
    5.19  	cat << EOT