source: client/shared/scripts/reboot @ ca0f67c6

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
Last change on this file since ca0f67c6 was 14ed3c9, checked in by ramon <ramongomez@…>, 12 years ago

#573: Scripts poweroff y reboot compatibles con los distintos clientes ogLive.

git-svn-id: https://opengnsys.es/svn/branches/version1.0@3652 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100755
File size: 643 bytes
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.
7echo "[10] Desmontar todos los sistemas de archivos."
8sync
9for (( i=1; i <= $(ogDiskToDev | wc -w); i++ )); do
10    ogUnmountAll $i 2>/dev/null
11done
12echo "[50] Desmontar cache local."
13ogUnmountCache 2>/dev/null
14echo "[90] Reiniciar el equipo."
15# Estado correcto de Wake-On-Lan antes de reiniciar.
16ethtool -s $DEVICE wol g 2>/dev/null
17# Detectar Busybox.
18BUSYBOX=$(which busyboxOLD)
19BUSYBOX=${BUSYBOX:-"busybox"}
20(sleep 5 && $BUSYBOX reboot)
21
22
Note: See TracBrowser for help on using the repository browser.