Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 20:20
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
showaufs, lsaufs - utilities to display aufs stack
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
gyro

Joined: 28 Oct 2008
Posts: 557
Location: Brisbane, Australia

PostPosted: Tue 16 Dec 2014, 06:55    Post subject:  showaufs, lsaufs - utilities to display aufs stack
Subject description: show information from directory '/sys/fs/aufs/si_*/'
 

showaufs:
Displays all the information contained in '/sys/fs/aufs/si_*/'.
If a branch directory is a mount point, it shows what is mounted there instead of the directory name.
A shell script that has no parameters.
Code:
# showaufs
br0   rw   /initrd/mnt/dev_save/puppy/squeeze/squeezesave
br1   ro   /initrd/mnt/dev_save/puppy/squeeze/puppy_squeeze_5.X.3.4.12.sfs
br2   ro   /initrd/mnt/dev_save/jre-1.7u45-i586.sfs
br3   ro   /initrd/mnt/dev_save/puppy/squeeze/devx_squeeze_5.X.3.4.12.sfs
xi_path    /tmp/.aufs.xino
#

lsaufs:
Lists the directories that are branches in the aufs stack, in the order they occur in the aufs stack.
It can be used by other scripts that need to process the directories in the current aufs stack.
A shell script that takes a single optional parameter which is the branch number to start with, '0' is the same as no parameter.
Code:
# lsaufs
/initrd/mnt/dev_save/puppy/squeeze/squeezesave
/initrd/pup_ro2
/initrd/pup_ro4
/initrd/pup_ro5
#
Code:
# lsaufs 2
/initrd/pup_ro4
/initrd/pup_ro5
#


Edit: Replaced 'showaufs' with new improved version, see post below. Now works with savefolder implemented as a 'bind -o mount'.

gyro
showaufs.gz
Description  gunzip to produce the shell script.
gz

 Download 
Filename  showaufs.gz 
Filesize  368 Bytes 
Downloaded  8 Time(s) 
lsaufs.gz
Description  gunzip to produce the shell script
gz

 Download 
Filename  lsaufs.gz 
Filesize  241 Bytes 
Downloaded  14 Time(s) 

Last edited by gyro on Thu 18 Dec 2014, 03:48; edited 2 times in total
Back to top
View user's profile Send private message 
stemsee

Joined: 27 Jun 2013
Posts: 678
Location: London

PostPosted: Wed 17 Dec 2014, 07:18    Post subject:  

Works nicely and I am sure will com in handy. Thanks!

stemsee
Back to top
View user's profile Send private message MSN Messenger 
mikeb


Joined: 23 Nov 2006
Posts: 9072

PostPosted: Wed 17 Dec 2014, 07:51    Post subject:  

and losetup is handy too...

Code:
bash-3.1# losetup /dev/loop4
/dev/loop4: [0302]:230345 (/mnt/hda2/nimblex/base/09-xfce4-4.4.2-230414.lzm)



I can do this on slax but not sure if there is a puppy equivalent now for cpio initrds... Sad

Code:
bash-3.1# cat /mnt/live/proc/mounts
rootfs / rootfs rw 0 0
/dev/root /mnt/live ext2 rw 0 0
proc /mnt/live/proc proc rw 0 0
/dev/hda2 /mnt/live/mnt/hda2 ext3 rw,noatime,data=ordered 0 0
/dev/hda2 /mnt/live/memory ext3 rw,noatime,data=ordered 0 0
tmpfs /mnt/live/memory/xino tmpfs rw 0 0
aufs / aufs rw,xino=/mnt/live/memory/xino/.aufs.xino,nowarn_perm 0 0
/dev/loop1 /mnt/live/memory/images/01-Core-230414.lzm squashfs ro,noatime 0 0
/dev/loop2 /mnt/live/memory/images/02-Xorg-1.4-170414.lzm squashfs ro,noatime 0 0
/dev/loop3 /mnt/live/memory/images/07-Common-091214.lzm squashfs ro,noatime 0 0
/dev/loop4 /mnt/live/memory/images/09-xfce4-4.4.2-230414.lzm squashfs ro,noatime 0 0
/dev/loop5 /mnt/live/memory/images/NVidia-Nimblex-13.lzm squashfs ro,noatime 0 0
/dev/loop6 /mnt/live/memory/images/glib-2.16-test.lzm squashfs ro,noatime 0 0
/dev/loop7 /mnt/live/memory/images/Audacity_1.2.6.lzm squashfs ro,noatime 0 0
/dev/loop8 /mnt/live/memory/images/Avidemux-2.4.4.lzm squashfs ro,noatime 0 0
/dev/loop9 /mnt/live/memory/images/Epdfview-5.lzm squashfs ro,noatime 0 0
/dev/loop10 /mnt/live/memory/images/Firefox-3.6.18-shared.lzm squashfs ro,noatime 0 0
/dev/loop11 /mnt/live/memory/images/Flash-10.0.15.lzm squashfs ro,noatime 0 0
/dev/loop12 /mnt/live/memory/images/FoxitReader.lzm squashfs ro,noatime 0 0
/dev/loop13 /mnt/live/memory/images/Gimp-2.4.5.lzm squashfs ro,noatime 0 0
/dev/loop14 /mnt/live/memory/images/LibreOffice-3.4.6-enGB-nopy.lzm squashfs ro,noatime 0 0
/dev/loop15 /mnt/live/memory/images/Mplayer-2009.lzm squashfs ro,noatime 0 0
/dev/loop16 /mnt/live/memory/images/Pipewalker-0.9.4.lzm squashfs ro,noatime 0 0
/dev/loop17 /mnt/live/memory/images/Powder_Toy.lzm squashfs ro,noatime 0 0
/dev/loop18 /mnt/live/memory/images/Seamonkey-2.9.1.lzm squashfs ro,noatime 0 0
/dev/loop19 /mnt/live/memory/images/Thunderbird-2.0.0.24.lzm squashfs ro,noatime 0 0
/dev/loop20 /mnt/live/memory/images/Vlc-0.8.6i-static.lzm squashfs ro,noatime 0 0
/dev/loop21 /mnt/live/memory/images/Xmms.lzm squashfs ro,noatime 0 0
/dev/loop22 /mnt/live/memory/images/Ysflight_Extra.lzm squashfs ro,noatime 0 0
/dev/loop23 /mnt/live/memory/images/Ysflight_JCraft.lzm squashfs ro,noatime 0 0
/dev/loop24 /mnt/live/memory/images/Ysflight_v3.lzm squashfs ro,noatime 0 0
/dev/loop25 /mnt/live/memory/images/adobereader-8.lzm squashfs ro,noatime 0 0
/dev/loop26 /mnt/live/memory/images/jre1.6.0_32.lzm squashfs ro,noatime 0 0
/dev/loop27 /mnt/live/memory/images/quorn-0.6.1.lzm squashfs ro,noatime 0 0
/dev/loop28 /mnt/live/memory/images/wine-1.1.20.lzm squashfs ro,noatime 0 0
/dev/hda2 /boot ext3 rw,noatime,data=ordered 0 0
proc /proc proc rw 0 0
sysfs /sys sysfs rw 0 0
tmpfs /dev tmpfs rw 0 0
devpts /dev/pts devpts rw 0 0
usbfs /proc/bus/usb usbfs rw 0 0
/dev/hda1 /mnt/hda1 fuseblk rw,noatime,user_id=0,group_id=0,allow_other 0 0
/dev/hda2 /mnt/hda2 ext3 rw,noatime,data=ordered 0 0
/dev/hda3 /mnt/hda3 ext3 rw,noatime,data=ordered 0 0
/dev/sda1 /mnt/sda1 vfat rw,noatime,fmask=0000,dmask=0000,codepage=cp437,iocharset=iso8859-1,shortname=mixed,check=s,quiet 0 0


mike
Back to top
View user's profile Send private message 
gyro

Joined: 28 Oct 2008
Posts: 557
Location: Brisbane, Australia

PostPosted: Thu 18 Dec 2014, 03:41    Post subject: New improved version of 'showaufs'  

New improved version of 'showaufs':

If the branch directory is a mount point, it checks that it is a 'loop' device before decoding it using 'losetup'.

The previous version would show nothing as the branch, if it was a savefolder implemented by a 'mount -o bind'.

Get it via initial post.

gyro
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0589s ][ Queries: 12 (0.0036s) ][ GZIP on ]