close
Warning:
Failed to sync with repository "ogBrowser-Git": (1366, "Incorrect string value: '\\xF0\\x9F\\x93\\xA6 I...' for column 'message' at row 1"); repository information may be out of date. Look in the Trac log for more information including mitigation strategies.
918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacion
| Rev | Line | |
|---|
| [140b7c9] | 1 | €jemplo de test de funciones de bloqueo de particiones e imagenes |
|---|
| 2 | ================================================================= |
|---|
| 3 | # Funciones de bloqueo |
|---|
| 4 | |
|---|
| 5 | $ ogLock 1 1 |
|---|
| 6 | $ ls /var/lock/lock-dev-sda1 |
|---|
| 7 | /var/lock/lock-dev-sda1 |
|---|
| 8 | |
|---|
| 9 | $ if ogIsLocked 1 1; then echo si; else echo no; fi |
|---|
| 10 | si |
|---|
| 11 | |
|---|
| 12 | $ ls /var/lock/lock-dev-sda1 |
|---|
| 13 | /var/lock/lock-dev-sda1 |
|---|
| 14 | |
|---|
| 15 | $ ogUnlock 1 1 |
|---|
| 16 | $ if ogIsLocked 1 1; then echo si; else echo no; fi |
|---|
| 17 | no |
|---|
| 18 | |
|---|
| 19 | $ ogLockPartition 1 1 |
|---|
| 20 | $ if ogIsLocked 1 1; then echo si; else echo no; fi |
|---|
| 21 | si |
|---|
| 22 | |
|---|
| 23 | $ ogUnlockPartition 1 1 |
|---|
| 24 | $ if ogIsLocked 1 1; then echo si; else echo no; fi |
|---|
| 25 | no |
|---|
| 26 | |
|---|
| 27 | |
|---|
| 28 | |
|---|
| 29 | |
|---|
| 30 | # Es necesario desmontar para probar ogCheck |
|---|
| 31 | $ ogUnmount 1 1 >/dev/null 2>&1 |
|---|
| 32 | |
|---|
| 33 | $ ogLock 1 1 |
|---|
| 34 | |
|---|
| 35 | $ ogCheckFs 1 1 |
|---|
| [5bfead0] | 36 | OpenGnsys error: ogCheckFs: "1 1" |
|---|
| [140b7c9] | 37 | |
|---|
| 38 | $ ogUnlock 1 1 |
|---|
| 39 | |
|---|
| 40 | $ ogCheckFs 1 1 >/dev/null 2>&1; echo $? |
|---|
| 41 | 0 |
|---|
| 42 | |
|---|
| 43 | |
|---|
| 44 | # Bloqueo del repositorio |
|---|
| 45 | |
|---|
| 46 | $ ogIsRepoLocked; echo $? |
|---|
| 47 | 1 |
|---|
| 48 | |
|---|
| 49 | # FALTA: test bloqueo repo cuando esta bloqueado |
|---|
| 50 | |
|---|
| 51 | # bloqueo de imagenes |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | # Creo una imagen ficticia |
|---|
| 56 | $ touch $OGIMG/_test_.img |
|---|
| 57 | |
|---|
| 58 | $ ogLockImage REPO _test_ |
|---|
| 59 | $ ls $OGIMG/_test_.lock |
|---|
| 60 | /opt/opengnsys/images/_test_.lock |
|---|
| 61 | |
|---|
| 62 | $ if ogIsImageLocked REPO _test_ ; then echo si; else echo no; fi |
|---|
| 63 | si |
|---|
| 64 | |
|---|
| 65 | $ ogUnlockImage REPO _test_ |
|---|
| 66 | $ if ogIsImageLocked REPO _test_ ; then echo si; else echo no; fi |
|---|
| 67 | no |
|---|
| 68 | |
|---|
| 69 | $ rm $OGIMG/_test_.* |
|---|
| 70 | |
|---|
| 71 | # Comprobando los errores (FALTA) |
|---|
| 72 | $ ogLock |
|---|
| [5bfead0] | 73 | OpenGnsys error: ogLockPartition: "" |
|---|
| [140b7c9] | 74 | |
|---|
| 75 | |
|---|
| 76 | $ ogLock 1 10 |
|---|
| [5bfead0] | 77 | OpenGnsys error: ogDiskToDev: "" |
|---|
| [140b7c9] | 78 | |
|---|
| 79 | |
|---|
| 80 | $ ogIsLocked |
|---|
| [5bfead0] | 81 | OpenGnsys error: ogIsLocked: "" |
|---|
| [140b7c9] | 82 | |
|---|
| 83 | $ ogIsLocked 1 10 |
|---|
| [5bfead0] | 84 | OpenGnsys error: ogDiskToDev: "" |
|---|
| [140b7c9] | 85 | |
|---|
Note: See
TracBrowser
for help on using the repository browser.