Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#31 closed defect (fixed)

update of node-specific config files (test of image-r6873)

Reported by: huub Owned by: rick
Priority: major Milestone:
Keywords: Cc:
Resource needed to fix:

Description

test of update script with http://webfolder.wirelessleiden.nl/rick/nodefactory/wl-node-image-r6873.gz

  • passwrd is not standard WL pwd.
  • filesystem must be mounted writable before update
  • rc.node.local is written to /etc and will be lost in reboot
  • General comment: the updated config files are 'all over the place', see below. Wouldn't it be better to write the node-specific config files all to /cfg (or a subdirectory of cfg) and keep the /base configuration identical for all nodes?

Tim pointed out that during the image-build proces there is the option to execute 'last_orders' (citaat Tim):

last_orders () (

# Redefine this function with any last orders you may have
# after the build completed, for instance to copy the finished
# image to a more convenient place:
# cp ${MAKEOBJDIRPREFIX}/_.disk.image /home/ftp/pub/nanobsd.disk

)

Niet heel netjes, maar met de volgende definitie van die functie in het
nanobsd configbestand zou opgelost kunnen worden

last_orders () (

MD=mdconfig -a -t vnode -f ${MAKEOBJDIRPREFIX}/_.disk.full
mount -t ufs /dev/${MD}s3 ${NANO_WORLDDIR}/cfg
cd ${NANO_WORLDDIR}/cfg/ && mkdir local namedb
cp /etc/resolv.conf /${NANO_WORLDDIR}/etc
chroot ${NANO_WORLDDIR} sh -c "/tools/config_update.sh"
umount ${NANO_WORLDDIR}/cfg && mdconfig -d -u ${MD}

)


Dit zijn de config files:

# ls /var/tmp/wl_config
CNodeHuub dhcpd.conf node_list.txt resolv.conf
authorized_keys named.conf rc.node.local txtconfig

# find / -name authorized_keys
/root/.ssh/authorized_keys
/var/tmp/wl_config/authorized_keys

# find / -name rc.node.local
/etc/rc.node.local

# find / -name named.conf
/var/named/etc/namedb/named.conf
/var/tmp/wl_config/named.conf
/conf/base/var/named/etc/namedb/named.conf

# find / -name dhcpd.conf
/etc/local/dhcpd.conf
/var/tmp/wl_config/dhcpd.conf
/conf/base/etc/local/dhcpd.conf

# find / -name resolv.conf
/etc/resolv.conf
/var/tmp/wl_config/resolv.conf

Change History (6)

in reply to:  description comment:1 by rick, 15 years ago

Replying to huub:

  • passwrd is not standard WL pwd.

Which is kind of logical as you don't want to expose it to the public world, but you are right will create a script which will reset the password to a non standard default.

in reply to:  description comment:2 by rick, 15 years ago

Replying to huub:

  • filesystem must be mounted writable before update
  • rc.node.local is written to /etc and will be lost in reboot

Nice spots! will update the config script to use the right locations, mounts.

  • General comment: the updated config files are 'all over the place', see below. Wouldn't it be better to write the node-specific config files all to /cfg (or a subdirectory of cfg) and keep the /base configuration identical for all nodes?

You are right will follow the directions at /etc/rc.initdiskless to make sure config files are places in a more logical location

Tim pointed out that during the image-build proces there is the option to execute 'last_orders' (citaat Tim):

last_orders () (

# Redefine this function with any last orders you may have
# after the build completed, for instance to copy the finished
# image to a more convenient place:
# cp ${MAKEOBJDIRPREFIX}/_.disk.image /home/ftp/pub/nanobsd.disk

)

Niet heel netjes, maar met de volgende definitie van die functie in het
nanobsd configbestand zou opgelost kunnen worden

last_orders () (

MD=mdconfig -a -t vnode -f ${MAKEOBJDIRPREFIX}/_.disk.full
mount -t ufs /dev/${MD}s3 ${NANO_WORLDDIR}/cfg
cd ${NANO_WORLDDIR}/cfg/ && mkdir local namedb
cp /etc/resolv.conf /${NANO_WORLDDIR}/etc
chroot ${NANO_WORLDDIR} sh -c "/tools/config_update.sh"
umount ${NANO_WORLDDIR}/cfg && mdconfig -d -u ${MD}

)

Really dirty hack, disabled it on purpose. It modifies the image and not it's source so it looses sync. Will take a look at the config locations.


Dit zijn de config files:

# ls /var/tmp/wl_config
CNodeHuub dhcpd.conf node_list.txt resolv.conf
authorized_keys named.conf rc.node.local txtconfig

Temporary files by config update script, to be deleted after successful transfer.

# find / -name authorized_keys
/root/.ssh/authorized_keys

The file really needs there (most logical place anyway), but might need some tweaks to get it there.

/var/tmp/wl_config/authorized_keys

Temporary files by config update script, to be deleted after successful transfer.

# find / -name rc.node.local
/etc/rc.node.local

Should live somewhere else /cfg/rc.node.local would be good location (persistent throughout images). Get copied to /etc/rc.node.local on boot.

# find / -name named.conf
/var/named/etc/namedb/named.conf

Chrooted location, might want to get rid of named chroot to place the file in some normal location

/var/tmp/wl_config/named.conf

Temporary files by config update script, to be deleted after successful transfer.

/conf/base/var/named/etc/namedb/named.conf

# find / -name dhcpd.conf
/etc/local/dhcpd.conf

Eeks, should be /usr/local/etc/dhcpd.conf

/var/tmp/wl_config/dhcpd.conf

Temporary files by config update script, to be deleted after successful transfer.

/conf/base/etc/local/dhcpd.conf

File needs other location

# find / -name resolv.conf
/etc/resolv.conf

should be at /cfg/

/var/tmp/wl_config/resolv.conf

Temporary files by config update script, to be deleted after successful transfer.

comment:3 by rick, 15 years ago

Tim was really getting somewhere /cfg/local is not a bad idea after all. Only thing to make sure is to symlink /usr/local/etc/ to /etc/local. This will get it going correctly. Also see hint: http://nanobsd.blogspot.com/2006/09/how-to-change-files-in-usrlocaletc-on.html

comment:4 by rick, 15 years ago

Milestone: 0.1

comment:5 by rick, 15 years ago

Resolution: fixed
Status: newclosed

All fixed using the new /tools/wl-config config updatte script

comment:6 by rick, 12 years ago

Milestone: 0.1

Milestone 0.1 deleted

Note: See TracTickets for help on using tickets.