This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # usb-grub-boot-switch.sh | |
| # | |
| # Switches the default GRUB boot entry based on whether a specific | |
| # USB drive is plugged in at boot time. | |
| # | |
| # USB plugged in -> boots the entry set as BOOT_ENTRY_ID below | |
| # USB not plugged -> boots the default entry from /etc/default/grub | |
| # (GRUB_DEFAULT=<ID>) |