--- elwix/build_fs.sh 2013/07/29 15:54:13 1.7.2.3 +++ elwix/build_fs.sh 2013/07/31 14:57:01 1.7.2.7 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.7.2.3 2013/07/29 15:54:13 misho Exp $ +# $Id: build_fs.sh,v 1.7.2.7 2013/07/31 14:57:01 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -37,9 +37,11 @@ clean_rel() mkdir -p $1 - cd ${ROMFS} - pax -rw -pe -X . $1 - cd - + if [ -d ${BASEFS} ]; then + cd ${BASEFS} + pax -rw -pe -X . $1 + cd - + fi } build_vardir() @@ -65,7 +67,6 @@ build_vardir() install -d -o 883 -g 883 altroot/var/mqtt; install -d altroot/var/named; install -d altroot/var/run; - install -d -m 1777 altroot/var/tmp; 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; @@ -75,6 +76,8 @@ build_vardir() install -d -g 1 altroot/var/spool/output; install -d -g 1 altroot/var/spool/output/lpd; + ln -fs /tmp altroot/var/tmp; + chown -hR root:wheel . cd - } @@ -146,7 +149,8 @@ create_etc_fstab() # Automatic generated fstab for ELWIX$2 at ${BUILD_DATE} # /dev/ufs/elwix / ufs ro 0 1 -md2 /var mfs rw,-s16m,-S 0 0 +md2 /tmp mfs rw,-s8m,-oasync,-S 0 0 +md3 /var mfs rw,-s16m,-S 0 0 _EOF } @@ -203,10 +207,10 @@ mkbackup() cd $1 cp -p etc/config.xml altroot/backup -# tar -czf altroot/backup/.etc.tgz etc + tar -czf altroot/backup/.etc.tgz etc -# cd altroot -# tar -czf backup/.var.tgz var + cd altroot + tar -czf backup/.var.tgz var } mkhome() @@ -234,14 +238,6 @@ install_rel() cd -; case "$2" in - _128) - install -d $1/usr/local - cd $1/usr/local - pax -r -z -pe -f ${REL}/${ROMFS_IMG2} - cd - - - OSZ=${REL}/${OS_128} - ;; *) OSZ=${REL}/${OS} ;; @@ -252,15 +248,6 @@ install_rel() } ### main() -if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS_IMG} ]; then - echo - echo "Error:: not found kernel or firmware elwix files ..." - echo - echo " For fix this issue, please re-run build_rootfs.sh or build_romfs.sh" - echo - exit 1 -fi - clean_rel ${FS} ${REL}/${OS} build_vardir ${FS}/elwix mkhome ${FS}/elwix