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-instalacionwebconsole3
Line | |
---|
1 | #!/bin/bash |
---|
2 | # Scirpt de ejemplo para reiniciar un ordenador |
---|
3 | # (puede usarse como base para el programa de reinicio usado por OpenGNSys Admin). |
---|
4 | |
---|
5 | |
---|
6 | # Desmontar los sistemas de archivos y la caché local. |
---|
7 | echo "[10] Desmontar todos los sistemas de archivos." |
---|
8 | sync |
---|
9 | for (( i=1; i <= $(ogDiskToDev | wc -w); i++ )); do |
---|
10 | ogUnmountAll $i 2>/dev/null |
---|
11 | done |
---|
12 | echo "[50] Desmontar cache local." |
---|
13 | ogUnmountCache 2>/dev/null |
---|
14 | echo "[90] Reiniciar el equipo." |
---|
15 | # Estado correcto de Wake-On-Lan antes de reiniciar. |
---|
16 | ethtool -s $DEVICE wol g 2>/dev/null |
---|
17 | # Detectar Busybox. |
---|
18 | BUSYBOX=$(which busyboxOLD) |
---|
19 | BUSYBOX=${BUSYBOX:-"busybox"} |
---|
20 | (sleep 5 && $BUSYBOX reboot) |
---|
21 | |
---|
22 | |
---|
Note: See
TracBrowser
for help on using the repository browser.