version 1.2.2.2, 2011/10/20 23:44:52
|
version 1.3.2.13, 2012/10/10 14:35:16
|
Line 54 build_fsdir()
|
Line 54 build_fsdir()
|
install -d altroot/var/at; |
install -d altroot/var/at; |
install -d altroot/var/at/jobs; |
install -d altroot/var/at/jobs; |
install -d altroot/var/at/spool; |
install -d altroot/var/at/spool; |
install -d -g authpf -m 0770 altroot/var/authpf; | install -d -g 63 -m 0770 altroot/var/authpf; |
install -d -m 0750 altroot/var/cron; |
install -d -m 0750 altroot/var/cron; |
install -d -m 0700 altroot/var/cron/tabs; |
install -d -m 0700 altroot/var/cron/tabs; |
install -d altroot/var/db; |
install -d altroot/var/db; |
install -d -m 0555 altroot/var/empty; |
install -d -m 0555 altroot/var/empty; |
install -d altroot/var/log; |
install -d altroot/var/log; |
install -d -o www -g www altroot/var/log/lighttpd; | install -d -o 101 -g 101 altroot/var/log/quagga; |
install -d -o quagga -g quagga altroot/var/log/quagga; | |
install -d altroot/var/named; |
install -d altroot/var/named; |
install -d altroot/var/run; |
install -d altroot/var/run; |
install -d -o www -g www altroot/var/run/lighttpd; | install -d altroot/var/sys; |
install -d -o bind -g bind altroot/var/run/named; | install -d -o 53 -g 53 altroot/var/run/named; |
install -d -o quagga -g quagga altroot/var/run/quagga; | install -d -o 101 -g 101 altroot/var/run/quagga; |
install -d altroot/var/spool; |
install -d altroot/var/spool; |
install -d -o uucp -g dialer -m 0775 altroot/var/spool/lock; | install -d -o 66 -g 68 -m 0775 altroot/var/spool/lock; |
install -d -g daemon altroot/var/spool/lpd; | install -d -g 1 altroot/var/spool/lpd; |
install -d -g daemon altroot/var/spool/output; | install -d -g 1 altroot/var/spool/output; |
install -d -g daemon altroot/var/spool/output/lpd; | install -d -g 1 altroot/var/spool/output/lpd; |
# boot |
# boot |
install -d boot; |
install -d boot; |
# cf |
# cf |
Line 84 build_fsdir()
|
Line 83 build_fsdir()
|
install -d home; |
install -d home; |
# root |
# root |
install -d -m 0700 root; |
install -d -m 0700 root; |
# local | # pkg |
install -d local; | install -d pkg; |
| install -d pkg/db; |
| install -d pkg/lib; |
# tftpboot |
# tftpboot |
install -d tftpboot; |
install -d tftpboot; |
|
|
Line 99 mkboot()
|
Line 100 mkboot()
|
InstallDir ${WORLD}/boot $1/boot |
InstallDir ${WORLD}/boot $1/boot |
|
|
install -m 644 ${CFGDIR}/boot/boot.config $1; |
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 |
if [ -r ${CFGDIR}/boot/loader_${TARGET_ARCH}.conf ]; then |
install -m 644 ${CFGDIR}/boot/loader_${TARGET_ARCH}.conf $1/boot/loader.conf; |
install -m 644 ${CFGDIR}/boot/loader_${TARGET_ARCH}.conf $1/boot/loader.conf; |
else |
else |
Line 164 _EOF
|
Line 168 _EOF
|
mketc() |
mketc() |
{ |
{ |
echo "+++ Build ELWIX FS etc directory ..." |
echo "+++ Build ELWIX FS etc directory ..." |
find ${FS_ETC} -name .#\* -exec rm -f {} \; |
|
|
|
InstallDir ${FS_ETC} $1/etc |
InstallDir ${FS_ETC} $1/etc |
|
|
chown -R root:wheel $1/etc; |
chown -R root:wheel $1/etc; |
Line 182 mketc()
|
Line 184 mketc()
|
|
|
chmod 0440 $1/etc/sudoers; |
chmod 0440 $1/etc/sudoers; |
|
|
chgrp www $1/etc/config.xml; | chgrp 80 $1/etc/config.xml; |
chmod 0660 $1/etc/config.xml; |
chmod 0660 $1/etc/config.xml; |
|
|
ln -sf /etc/rc.s $1/etc/rc.S |
ln -sf /etc/rc.s $1/etc/rc.S |
Line 193 mketc()
|
Line 195 mketc()
|
ln -sf /var/named/etc/namedb $1/etc/namedb; |
ln -sf /var/named/etc/namedb $1/etc/namedb; |
ln -sf /var/run/resolv.conf $1/etc/resolv.conf; |
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; |
echo ${TARGET_ARCH} >$1/etc/platform; |
|
|
create_etc_motd $1/etc/motd; |
create_etc_motd $1/etc/motd; |
create_etc_fstab $1/etc/fstab; |
create_etc_fstab $1/etc/fstab; |
|
|
|
echo "+++ ELWIX clean CVS tags ..." |
|
CleanCVS ${FS} |
|
CleanCVS ${FS}/etc |
} |
} |
|
|
mkbackup() |
mkbackup() |
Line 205 mkbackup()
|
Line 213 mkbackup()
|
mkdir -p $1/altroot/backup |
mkdir -p $1/altroot/backup |
|
|
cd $1 |
cd $1 |
tar -czf altroot/backup/.etc.tgz etc |
|
cp -p etc/config.xml altroot/backup |
cp -p etc/config.xml altroot/backup |
|
tar -czf altroot/backup/.etc.tgz etc |
|
|
cd altroot |
cd altroot |
tar -czf backup/.var.tgz var |
tar -czf backup/.var.tgz var |
} |
} |
Line 231 install_fsdir()
|
Line 240 install_fsdir()
|
|
|
install -v ${REL}/${ROOTFS_KERN} ${FS}/boot/kernel |
install -v ${REL}/${ROOTFS_KERN} ${FS}/boot/kernel |
|
|
install -v ${REL}/${ROMFS_IMG} ${FS}/elwix-firmware-${VERSION}_${TARGET_ARCH} | if [ "${BUILD_FRMIMG}" = "YES" ]; then |
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} |
|
|
|
install -v ${REL}/${ROMFS_IMG2} ${FS}/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} |
|
ln ${FS}/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} ${FS}/altroot/${ROMFS_IMG2} |
|
ln -s /elwix/altroot/elwix-firmware2-${VERSION}_${TARGET_ARCH} ${FS}/${ROMFS_IMG2} |
|
else |
|
install -d ${FS}/usr |
|
cd ${FS}/usr |
|
pax -r -z -pe -f ${REL}/${ROMFS_IMG} |
|
cd - |
|
fi |
|
|
cd $FS |
cd $FS |
tar -czvf ${REL}/${OS} . |
tar -czvf ${REL}/${OS} . |
} |
} |
|
|
cleancvs() |
|
{ |
|
echo "+++ ELWIX clean CVS tags ..." |
|
|
|
find $1 -type d -name CVS -exec rm -rf {} \; >/dev/null 2>&1 |
|
} |
|
|
|
### main() |
### main() |
if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS_IMG} ]; then |
if [ ! -r ${REL}/${ROOTFS_KERN} -o ! -r ${REL}/${ROMFS_IMG} ]; then |
echo |
echo |
Line 262 mkboot ${FS}
|
Line 276 mkboot ${FS}
|
mkhome ${FS} |
mkhome ${FS} |
mkvar ${FS} |
mkvar ${FS} |
mketc ${FS} |
mketc ${FS} |
cleancvs ${FS} |
|
mkbackup ${FS} |
mkbackup ${FS} |
|
|
install_fsdir |
install_fsdir |