--- elwix/build_fs.sh 2011/07/21 13:46:05 1.1.2.2 +++ elwix/build_fs.sh 2011/10/25 13:55:56 1.2.2.4 @@ -5,7 +5,7 @@ # (C) AITNET ltd - Sofia/Bulgaria # by Michael Pounov # -# $Id: build_fs.sh,v 1.1.2.2 2011/07/21 13:46:05 misho Exp $ +# $Id: build_fs.sh,v 1.2.2.4 2011/10/25 13:55:56 misho Exp $ # [ -r ./config/rc.elwix ] && . ./config/rc.elwix @@ -74,11 +74,6 @@ build_fsdir() install -d -g daemon altroot/var/spool/output/lpd; # boot install -d boot; - install -d boot/defaults; - install -d boot/firmware; - install -d boot/kernel; - install -d boot/modules; - install -d boot/zfs; # cf install -d cf; # etc @@ -104,8 +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 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 @@ -167,8 +167,12 @@ _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; @@ -179,6 +183,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; @@ -238,6 +243,13 @@ install_fsdir() 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 @@ -255,6 +267,7 @@ mkboot ${FS} mkhome ${FS} mkvar ${FS} mketc ${FS} +cleancvs ${FS} mkbackup ${FS} install_fsdir