--- elwix/build_fs.sh 2016/12/20 14:40:20 1.10.2.3 +++ elwix/build_fs.sh 2018/07/06 08:30:29 1.11.2.10 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.10.2.3 2016/12/20 14:40:20 misho Exp $ +# $Id: build_fs.sh,v 1.11.2.10 2018/07/06 08:30:29 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -39,62 +39,30 @@ clean_fsdir() build_fsdir() { + # + # Structure of ELWIX CF Drive mount on /elwix + # echo "+++ Build ELWIX FS directory ... $1" mkdir -p $1 cd $1 - -# altroot - install -d altroot; - # altroot/var - install -d altroot/var; - install -d altroot/var/account; - install -d altroot/var/at; - install -d altroot/var/at/jobs; - install -d altroot/var/at/spool; - install -d -g 63 -m 0770 altroot/var/authpf; - install -d -m 0750 altroot/var/cron; - install -d -m 0700 altroot/var/cron/tabs; - install -d altroot/var/db; - install -d -m 0555 altroot/var/empty; - install -d altroot/var/log; - install -d -o 101 -g 101 altroot/var/log/quagga; - install -d -o 883 -g 883 altroot/var/mqtt; - install -d altroot/var/named; - install -d altroot/var/run; - install -d altroot/var/sys; - install -d -o 53 -g 53 altroot/var/run/named; - install -d -o 101 -g 101 altroot/var/run/quagga; - install -d altroot/var/spool; - install -d -o 66 -g 68 -m 0775 altroot/var/spool/lock; - install -d -g 1 altroot/var/spool/lpd; - install -d -g 1 altroot/var/spool/output; - install -d -g 1 altroot/var/spool/output/lpd; # boot install -d boot; # cf install -d cf; - case ${TARGET} in - i386) - ln -fs /dev/ada0g cf/map.cfg - ;; - mips) - ln -fs /dev/map/cfg cf/map.cfg - ;; - esac # etc install -d etc; - install -d -o 883 -g 883 etc/mqtt; # exports install -d exports; # home install -d home; +# local + install -d local; + install -d local/lib; # root install -d -m 0750 root; # pkg install -d pkg; - install -d pkg/db; - install -d pkg/lib; # tftpboot install -d tftpboot; @@ -107,9 +75,6 @@ create_etc_fstab() cat >$1/etc/fstab <<_EOF # Automatic generated fstab for ELWIX $2 at ${BUILD_DATE} # -/dev/ufs/elwix /elwix ufs ro 0 1 -md3 /tmp mfs rw,-s8m,-oasync,-S,-n 0 0 -md4 /var mfs rw,-s16m,-S,-n 0 0 _EOF } @@ -132,8 +97,8 @@ install_fsdir() pax -r -z -pe -f ${REL}/${ROMFS_IMG} cd - - install -d $1/usr/local - cd $1/usr/local + install -d $1/pkg + cd $1/pkg pax -r -z -pe -f ${REL}/${ROMFS_IMG2} cd - @@ -186,17 +151,14 @@ MakeFS_home ${FS_EXT} || exit 1 MakeFS_var ${FS} ${FS_ETC} || exit 1 MakeFS_var ${FS_EXT} ${FS_EXT_ETC} || exit 1 -MakeFS_etc ${FS} ${FS_ETC} || exit 1 -MakeFS_etc ${FS_EXT} ${FS_EXT_ETC} ext || exit 1 +MakeFS_etc ${FS} ${FS_ETC} rootfs || exit 1 +MakeFS_etc ${FS_EXT} ${FS_EXT_ETC} rootfsext || exit 1 create_etc_fstab ${FS} || exit 1 create_etc_fstab ${FS_EXT} ext || exit 1 update_etc_cfexec ${FS} || exit 1 update_etc_cfexec ${FS_EXT} ext || exit 1 - -MakeFS_backup ${FS} || exit 1 -MakeFS_backup ${FS_EXT} || exit 1 MakeFS_boot ${FS} || exit 1 MakeFS_boot ${FS_EXT} || exit 1