summaryrefslogtreecommitdiffstats
path: root/client/shared/scripts/reboot
diff options
context:
space:
mode:
Diffstat (limited to 'client/shared/scripts/reboot')
-rwxr-xr-xclient/shared/scripts/reboot17
1 files changed, 17 insertions, 0 deletions
diff --git a/client/shared/scripts/reboot b/client/shared/scripts/reboot
new file mode 100755
index 00000000..7b7f3c94
--- /dev/null
+++ b/client/shared/scripts/reboot
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Scirpt de ejemplo para reiniciar un ordenador
+# (puede usarse como base para el programa de reinicio usado por OpenGNSys Admin).
+
+PROG="$(basename $0)"
+
+echo "[10] Desmontar todos los sistemas de archivos."
+sync
+for (( i=1; i <= $(ogDiskToDev | wc -w); i++ )); do
+ ogUnmountAll $i 2>/dev/null
+done
+echo "[50] Desmontar cache local."
+ogUnmountCache
+echo "[90] Reiniciar el equipo."
+ethtool -s $DEVICE wol g
+(sleep 5 && busybox reboot) &
+