2 # (c) copyright 2010 by Thomas Tanner <tanner@gmx.de>
4 mountpoints="cdrom dev floppy home initrd media mnt nand proc sys syspart tmp"
6 test "$#" -eq 0 && echo "$0 destination [source]" && exit 1
7 dest="$1" # rootfs destination (absolute path or device)
14 echo destination is partition
15 test -d /media/moebian && (echo cannot create mountdir; exit 1)
16 mkdir -p /media/moebian
17 mount $dest /media/moebian
23 # create toplevel dirs and nand mount point
24 mountpoints="cdrom floppy home initrd media mnt nand proc srv sys syspart tmp"
26 copydirs="bin boot etc dev lib sbin root var"
28 rm -rf $mountpoints $copydirs $content
30 if test $dest = /home && test -L /opt; then
31 if test -d opt.nand; then
35 echo "/home/opt.nand moved to /home/opt and symlink updated"
37 echo "opt for NAND does not exist"
41 rm /etc/bootmenu.d/moebian.item
45 if test $rawdest = yes; then
46 echo removing temporary mount point
47 umount $dest && rm -rf $dest