| 1 | copy & paste |
| 2 | |
| 3 | {{{ |
| 4 | echo "inicio copia de seguridad"; |
| 5 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}; |
| 6 | TFTPDIR=$OPENGNSYS/tftpboot; |
| 7 | CLIENTINITRD=$TFTPDIR/ogclient/oginitrd.img; |
| 8 | TMPDIR=/tmp/ogclient; |
| 9 | cp /opt/opengnsys/tftpboot/oginitrd.img /opt/opengnsys/tftpboot/oginitrd.img.ORIGINAL; |
| 10 | cp /opt/opengnsys/tftpboot/oginitrd.img.sum /opt/opengnsys/tftpboot/oginitrd.img.sum.ORIGINAL; |
| 11 | cp /opt/opengnsys/tftpboot/ogclient/oginitrd.img /opt/opengnsys/tftpboot/ogclient/oginitrd.img.ORIGINAL; |
| 12 | cp /opt/opengnsys/tftpboot/ogclient/oginitrd.img.sum /opt/opengnsys/tftpboot/ogclient/oginitrd.img.ORIGINAL.sum; |
| 13 | echo "fin copia de seguridad"; |
| 14 | }}} |
| 15 | |
| 16 | {{{ |
| 17 | echo "inicio descompresión del initrd"; |
| 18 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}; |
| 19 | TFTPDIR=$OPENGNSYS/tftpboot; |
| 20 | CLIENTINITRD=$TFTPDIR/ogclient/oginitrd.img; |
| 21 | TMPDIR=/tmp/ogclient; |
| 22 | mkdir -p $TMPDIR; |
| 23 | cd $TMPDIR; |
| 24 | gzip -dc $CLIENTINITRD | cpio -im; |
| 25 | echo "El initrd abierto y accesible en $TMPDIR/scripts/{oginit ogfunctions}"; |
| 26 | }}} |
| 27 | |
| 28 | Ejemplo de modificación para solucionar la configuración de red |
| 29 | {{{ |
| 30 | #echo el scripts principal oginit |
| 31 | #linea |
| 32 | 73 ogConfigureNetworking || ogConfigureNetworking |
| 33 | while !(ping -c1 172.17.9.19 &> /dev/null) |
| 34 | do |
| 35 | ogConfigureNetworking |
| 36 | done |
| 37 | |
| 38 | # funicones usadas por oginit en ogfunctions |
| 39 | }}} |
| 40 | |
| 41 | {{{ |
| 42 | echo "inicio compresión del intird."; |
| 43 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}; |
| 44 | TFTPDIR=$OPENGNSYS/tftpboot; |
| 45 | CLIENTINITRD=$TFTPDIR/ogclient/oginitrd.img; |
| 46 | TMPDIR=/tmp/ogclient; |
| 47 | cd $TMPDIR; |
| 48 | find . | cpio -H newc -oa | gzip -9c > $CLIENTINITRD; |
| 49 | md5sum $CLIENTINITRD | cut -f1 -d" " > $CLIENTINITRD.sum; |
| 50 | echo "fin compresión del intird."; |
| 51 | }}} |
| 52 | |
| 53 | |
| 54 | {{{ |
| 55 | echo "inicio publicación nuevo intird."; |
| 56 | OPENGNSYS=${OPENGNSYS:-"/opt/opengnsys"}; |
| 57 | TFTPDIR=$OPENGNSYS/tftpboot; |
| 58 | CLIENTINITRD=$TFTPDIR/ogclient/oginitrd.img; |
| 59 | TMPDIR=/tmp/ogclient; |
| 60 | cp -a $CLIENTINITRD $TFTPDIR |
| 61 | cp -a $CLIENTINITRD.sum $TFTPDIR |
| 62 | echo "fin publicación nuevo intird."; |
| 63 | }}} |