--- elwix/build_fs.sh 2011/10/20 14:16:14 1.2.2.1 +++ elwix/build_fs.sh 2011/11/02 10:30:20 1.3.2.2 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.2.2.1 2011/10/20 14:16:14 misho Exp $ +# $Id: build_fs.sh,v 1.3.2.2 2011/11/02 10:30:20 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -99,10 +99,13 @@ mkboot() InstallDir ${WORLD}/boot $1/boot install -m 644 ${CFGDIR}/boot/boot.config $1; - install -m 644 ${CFGDIR}/boot/beastie.4th $1/boot; - install -m 644 ${CFGDIR}/boot/brand.4th $1/boot; - install -m 644 ${CFGDIR}/boot/menu.4th $1/boot; + install -m 444 ${CFGDIR}/boot/beastie.4th $1/boot; + install -m 444 ${CFGDIR}/boot/brand.4th $1/boot; + install -m 444 ${CFGDIR}/boot/menu.4th $1/boot; + + install -m 444 ${KERNDEVHINTS} $1/boot/device.hints; + if [ -r ${CFGDIR}/boot/loader_${TARGET_ARCH}.conf ]; then install -m 644 ${CFGDIR}/boot/loader_${TARGET_ARCH}.conf $1/boot/loader.conf; else @@ -164,8 +167,6 @@ _EOF mketc() { echo "+++ Build ELWIX FS etc directory ..." - find ${FS_ETC} -name .#\* -exec rm -f {} \; - InstallDir ${FS_ETC} $1/etc chown -R root:wheel $1/etc; @@ -178,6 +179,7 @@ mketc() chmod 0600 $1/etc/ssh/ssh_host_dsa_key; chmod 0600 $1/etc/ssh/ssh_host_key; chmod 0600 $1/etc/ssh/ssh_host_rsa_key; + chmod 0600 $1/etc/ssh/ssh_host_ecdsa_key; chmod 0440 $1/etc/sudoers; @@ -230,8 +232,9 @@ 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} . @@ -242,6 +245,7 @@ cleancvs() echo "+++ ELWIX clean CVS tags ..." find $1 -type d -name CVS -exec rm -rf {} \; >/dev/null 2>&1 + find $1 -type f -name .#\* -exec rm -f {} \; >/dev/null 2>&1 } ### main() @@ -262,6 +266,7 @@ mkhome ${FS} mkvar ${FS} mketc ${FS} cleancvs ${FS} +cleancvs ${FS}/etc mkbackup ${FS} install_fsdir