Subdomain Posts
None | 17 hours ago
None | 17 hours ago
None | 1 day ago
None | 1 day ago
None | 2 days ago
None | 3 days ago
None | 3 days ago
None | 6 days ago
None | 7 days ago
None | 7 days ago
Recent Posts
Bash | 2 sec ago
None | 9 sec ago
None | 10 sec ago
None | 23 sec ago
None | 36 sec ago
Bash | 57 sec ago
None | 1 min ago
None | 1 min ago
None | 1 min ago
None | 2 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By t_j on the 9th of Feb 2010 04:01:27 PM Download | Raw | Embed | Report
  1. > $ cat mk-mfsroots
  2. #!/bin/sh
  3. CONFIGS=/data/tftpboot/freebsd/install-cfgs
  4. INSTALL=/data/tftpboot/freebsd/
  5.  
  6. ## Cleanup old menus.
  7. cd $INSTALL
  8. for ENV in `find . -type d -name pxe -depth 3`; do
  9.     echo "Boot Env: ${ENV}"
  10.     rm ${ENV}/boot/loader.menu
  11.     touch ${ENV}/boot/loader.menu
  12. done
  13. cd $CONFIGS
  14.  
  15. for CFG in `find . -type f -iname '*.cfg'`; do
  16.     CFG=`echo ${CFG} | cut -b 3-`
  17.     VERSION=`echo ${CFG} | cut -d / -f 1`
  18.     ARCH=`echo ${CFG} | cut -d / -f 2`
  19.     PXEDIR="${INSTALL}`dirname ${CFG}`/pxe/boot"
  20.     MFS=`basename ${CFG} .cfg | cut -d - -f 2`
  21.     EXTDIR="`dirname ${CFG}`/${MFS}"
  22.     MENUITEM=`fgrep '# MINTEL_MENU_ITEM:' ${CFG} | cut -d : -f 2`
  23.     echo "Config ${CFG}"
  24.     echo -e "\tRelease: ${VERSION}"
  25.     echo -e "\tArch ${ARCH}"
  26.     echo -e "\tPXE Dir: ${PXEDIR}"
  27.     echo -e "\tEXT Dir: ${EXTDIR}"
  28.     echo -e "\tMFS Image: ${MFS}"
  29.     echo -e "\tMenu Item: ${MENUITEM}"
  30.     cp ${PXEDIR}/mfsroot-manual ${PXEDIR}/mfsroot-${MFS}
  31.     MD=`mdconfig -a -t vnode -f ${PXEDIR}/mfsroot-${MFS}`
  32.     mount /dev/${MD} /mnt
  33.     cp $CFG /mnt/install.cfg
  34.     if [ -d ${EXTDIR} ]; then
  35.         ( cd ${EXTDIR}
  36.             rsync -av . /mnt/
  37.         )
  38.     fi
  39.     umount /mnt
  40.     mdconfig -d -u ${MD}
  41.     echo "echo ${MENUITEM}" >> ${PXEDIR}/loader.menu
  42. done
  43.  
  44.  
  45. tj@wolo '16:00:10' '/data/tftpboot/freebsd/install-cfgs'
  46. > $ tree
  47. .
  48. |-- 6.2
  49. |   |-- amd64
  50. |   |   `-- install-x9xx.cfg
  51. |   `-- i386
  52. |       `-- install-x9xx.cfg
  53. |-- 7.0
  54. |   |-- amd64
  55. |   |   `-- install-x9xx.cfg
  56. |   `-- i386
  57. |       `-- install-x9xx.cfg
  58. |-- 7.1
  59. |   |-- amd64
  60. |   |   |-- install-xxx_nfs_install.cfg
  61. |   |   |-- install-xxx_nfs_part.cfg
  62. |   |   |-- install-x9xx.cfg
  63. |   |   `-- xxx_nfs_part
  64. |   |       |-- etc
  65. |   |       |   |-- empty-label.conf
  66. |   |       |   `-- fdisk.conf
  67. |   |       `-- xxx
  68. |   |           `-- partition.sh
  69. |   `-- i386
  70. |       |-- install-net5501.cfg
  71. |       `-- install-x9xx.cfg
  72. `-- mk-mfsroots
  73.  
  74. 12 directories, 13 files
  75. tj@wolo '16:00:25' '/data/tftpboot/freebsd/install-cfgs'
  76. > $
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: