new implementation for getting root permissions
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env xdg-open
|
||||
[Desktop Entry]
|
||||
Categories=Utility;System;
|
||||
Comment[de_DE]=Bootet direkt nach Windows oder setzt den GRUB-Boot-Eintrag
|
||||
Comment=Bootet direkt nach Windows oder setzt den GRUB-Boot-Eintrag
|
||||
Exec=pkexec /home/thorsten/Scripte/shell_boot-to-windows/boot-to-windows.sh
|
||||
Comment[de_DE]=Bootet direkt nach Windows oder setzt den GRUB-Boot-Eintrag für den nächsten Start
|
||||
Comment=Bootet direkt nach Windows oder setzt den GRUB-Boot-Eintrag für den nächsten Start
|
||||
Exec=/home/thorsten/Scripte/shell_boot-to-windows/boot-to-windows.sh
|
||||
GenericName[de_DE]=
|
||||
GenericName=
|
||||
Icon=/home/thorsten/Scripte/shell_boot-to-windows/boot-to-windows.png
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Überprüfen, ob das Skript mit Root-Rechten läuft
|
||||
if [ "$EUID" -ne 0 ]; then
|
||||
# Root Rechte anfordern und neu starten
|
||||
exec sudo "$0" "$@"
|
||||
fi
|
||||
|
||||
# Ermitteln, ob grub oder grub2 verwendet wird
|
||||
if [[ -d "/boot/grub2" ]]; then
|
||||
GRUB_DIR="/boot/grub2"
|
||||
|
||||
Reference in New Issue
Block a user