Diff for /elwix/build_fs.sh between versions 1.8 and 1.10.2.4

version 1.8, 2013/08/05 13:10:16 version 1.10.2.4, 2016/12/21 13:20:54
Line 32  fi Line 32  fi
   
 clean_fsdir()  clean_fsdir()
 {  {
        echo "+++ Clean ELWIX FS ..."        echo "+++ Clean ELWIX FS ... $1"
         chflags -Rf nosunlink $1
         rm -rf $1 $2          rm -rf $1 $2
 }  }
   
 build_fsdir()  build_fsdir()
 {  {
        echo "+++ Build ELWIX FS directory ..."        echo "+++ Build ELWIX FS directory ... $1"
         mkdir -p $1          mkdir -p $1
   
         cd $1          cd $1
Line 73  build_fsdir() Line 74  build_fsdir()
         install -d boot;          install -d boot;
 # cf  # cf
         install -d 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  # etc
         install -d etc;          install -d etc;
         install -d -o 883 -g 883 etc/mqtt;          install -d -o 883 -g 883 etc/mqtt;
Line 81  build_fsdir() Line 90  build_fsdir()
 # home  # home
         install -d home;          install -d home;
 # root  # root
        install -d -m 0700 root;        install -d -m 0750 root;
 # pkg  # pkg
         install -d pkg;          install -d pkg;
         install -d pkg/db;          install -d pkg/db;
Line 99  create_etc_fstab() Line 108  create_etc_fstab()
 # Automatic generated fstab for ELWIX $2 at ${BUILD_DATE}  # Automatic generated fstab for ELWIX $2 at ${BUILD_DATE}
 #  #
 /dev/ufs/elwix          /elwix  ufs     ro                      0       1  /dev/ufs/elwix          /elwix  ufs     ro                      0       1
 md3                     /tmp    mfs     rw,-s8m,-oasync,-S      0       0  
 md4                     /var    mfs     rw,-s16m,-S             0       0  
 _EOF  _EOF
 }  }
   
   update_etc_cfexec()
   {
           echo "mount = \"/elwix\"" >> $1/etc/cfexec.conf
   }
   
 install_fsdir()  install_fsdir()
 {  {
        echo "+++ Install ELWIX FS $1 in bundle OS install file ..."        echo "+++ Install ELWIX RootFS $1 in bundle OS install file ..."
         OSZ=""          OSZ=""
   
         install -v ${REL}/${ROOTFS_KERN} $1/boot/kernel/kernel.gz          install -v ${REL}/${ROOTFS_KERN} $1/boot/kernel/kernel.gz
Line 146  install_fsdir() Line 158  install_fsdir()
   
         cd $1          cd $1
         tar -czvf $OSZ .          tar -czvf $OSZ .
   
           echo "+++ Completed ELWIX RootFS $1 --> $OSZ"
 }  }
   
 ### main()  ### main()
Line 158  if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS Line 172  if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS
         exit 1          exit 1
 fi  fi
   
clean_fsdir ${FS} ${REL}/${OS}clean_fsdir ${FS} ${REL}/${OS} || exit 1
clean_fsdir ${FS_EXT} ${REL}/${OS_EXT}clean_fsdir ${FS_EXT} ${REL}/${OS_EXT} || exit 1
   
build_fsdir ${FS}build_fsdir ${FS} || exit 1
build_fsdir ${FS_EXT}build_fsdir ${FS_EXT} || exit 1
   
MakeFS_home ${FS}MakeFS_home ${FS} || exit 1
MakeFS_home ${FS_EXT}MakeFS_home ${FS_EXT} || exit 1
   
MakeFS_var ${FS} ${FS_ETC}MakeFS_var ${FS} ${FS_ETC} || exit 1
MakeFS_var ${FS_EXT} ${FS_EXT_ETC}MakeFS_var ${FS_EXT} ${FS_EXT_ETC} || exit 1
   
MakeFS_etc ${FS} ${FS_ETC}MakeFS_etc ${FS} ${FS_ETC} || exit 1
MakeFS_etc ${FS_EXT} ${FS_EXT_ETC} extMakeFS_etc ${FS_EXT} ${FS_EXT_ETC} ext || exit 1
   
create_etc_fstab ${FS}create_etc_fstab ${FS} || exit 1
create_etc_fstab ${FS_EXT} extcreate_etc_fstab ${FS_EXT} ext || exit 1
   
MakeFS_backup ${FS}update_etc_cfexec ${FS} || exit 1
MakeFS_backup ${FS_EXT}update_etc_cfexec ${FS_EXT} ext || exit 1
   
MakeFS_boot ${FS}MakeFS_backup ${FS} || exit 1
MakeFS_boot ${FS_EXT}MakeFS_backup ${FS_EXT} || exit 1
   
install_fsdir ${FS}MakeFS_boot ${FS} || exit 1
install_fsdir ${FS_EXT} extMakeFS_boot ${FS_EXT} || exit 1
   
echo "+++ Complete build ELWIX FS"install_fsdir ${FS} || exit 1
echo "ELWIX finish version ${VERSION}, Good luck!"install_fsdir ${FS_EXT} ext || exit 1
 
 echo "+++ Complete build ELWIX RootFS system"
 echo "ELWIX RootFS finish version ${VERSION}, Good luck!"

Removed from v.1.8  
changed lines
  Added in v.1.10.2.4


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>