--- elwix/build_fs.sh 2011/11/02 09:51:32 1.3 +++ elwix/build_fs.sh 2012/03/20 16:12:44 1.3.2.5 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.3 2011/11/02 09:51:32 misho Exp $ +# $Id: build_fs.sh,v 1.3.2.5 2012/03/20 16:12:44 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -84,8 +84,9 @@ build_fsdir() install -d home; # root install -d -m 0700 root; -# local - install -d local; +# pkg + install -d pkg; + install -d pkg/db; # tftpboot install -d tftpboot; @@ -167,12 +168,8 @@ _EOF mketc() { echo "+++ Build ELWIX FS etc directory ..." - find ${FS_ETC} -name .#\* -exec rm -f {} \; - InstallDir ${FS_ETC} $1/etc - find $1/etc -name CVS -exec rm -rf {} \; - chown -R root:wheel $1/etc; chmod 0600 $1/etc/opieaccess; @@ -198,10 +195,16 @@ mketc() ln -sf /var/named/etc/namedb $1/etc/namedb; ln -sf /var/run/resolv.conf $1/etc/resolv.conf; + ln -sf /elwix/pkg/etc/mk.conf $1/etc/mk.conf; + echo ${TARGET_ARCH} >$1/etc/platform; create_etc_motd $1/etc/motd; create_etc_fstab $1/etc/fstab; + + echo "+++ ELWIX clean CVS tags ..." + CleanCVS ${FS} + CleanCVS ${FS}/etc } mkbackup() @@ -236,20 +239,14 @@ install_fsdir() install -v ${REL}/${ROOTFS_KERN} ${FS}/boot/kernel - install -v ${REL}/${ROMFS_IMG} ${FS}/elwix-firmware-${VERSION}_${TARGET_ARCH} - ln -s /elwix/elwix-firmware-${VERSION}_${TARGET_ARCH} ${FS}/${ROMFS_IMG} + install -v ${REL}/${ROMFS_IMG} ${FS}/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} + ln ${FS}/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} ${FS}/altroot/${ROMFS_IMG} + ln -s /elwix/altroot/elwix-firmware-${VERSION}_${TARGET_ARCH} ${FS}/${ROMFS_IMG} cd $FS tar -czvf ${REL}/${OS} . } -cleancvs() -{ - echo "+++ ELWIX clean CVS tags ..." - - find $1 -type d -name CVS -exec rm -rf {} \; >/dev/null 2>&1 -} - ### main() if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS_IMG} ]; then echo @@ -267,7 +264,6 @@ mkboot ${FS} mkhome ${FS} mkvar ${FS} mketc ${FS} -cleancvs ${FS} mkbackup ${FS} install_fsdir