I try to explain with examples:
[EMAIL PROTECTED] aufs]# mount -n -t aufs -o
br=/mnt/aufs/.changes=rw:/mnt/aufs/dir1=ro none /mnt/aufs/filesystem
[EMAIL PROTECTED] aufs]# unionctl /mnt/aufs/filesystem --list
/mnt/aufs/.changes (rw-)
/mnt/aufs/dir1 (r--)
Add a new branch with original unionctl:
[EMAIL PROTECTED] aufs]#
unionctl /mnt/aufs/filesystem --add --before /mnt/aufs/dir1 --mode ro /etc
[EMAIL PROTECTED] aufs]# unionctl /mnt/aufs/filesystem --list
/etc (r--)
/mnt/aufs/.changes (rw-)
/mnt/aufs/dir1 (r--)
/etc goes two position above dir1, when should go only one.
With unionctl modifyed:
[EMAIL PROTECTED] aufs]#
unionctl /mnt/aufs/filesystem --add --before /mnt/aufs/dir1 --mode ro /etc
[EMAIL PROTECTED] aufs]# unionctl /mnt/aufs/filesystem --list
/mnt/aufs/.changes (rw-)
/etc (r--)
/mnt/aufs/dir1 (r--)
> test $bindex -lt 0 && bindex=0 || :
This test is with --before and --after is always false:
With --before $bindex is 0 (with original unionctl), and 1 with my
modification.
With --after $bindex is 2.
I hope you have understand now ;)
Regards,
Fernando Gomes
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV