Created
July 25, 2014 21:23
-
-
Save timconradinc/e1a697792cb132890884 to your computer and use it in GitHub Desktop.
fpm install
This file contains 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/bash | |
# source $(pwd)/config.sh | |
GRUB_CONFIG="/etc/default/grub" | |
GRUB_TEMPLATE="/data/company/company-grub/src/grub-default" | |
GRUB_BACKUP="/data/company/company-grub/bak/grub-default-config" | |
# the grub default should always exist, but just in case. | |
if [ -f ${GRUB_CONFIG} ] ; then | |
# copy a backup in the /etc/default directory | |
cp -v ${GRUB_CONFIG} "${GRUB_CONFIG}.company-bak" | |
# copy it to the package backup directory | |
cp -v ${GRUB_CONFIG} ${GRUB_BACKUP} | |
fi | |
if [ -f ${GRUB_TEMPLATE} ] ; then | |
if [ -f ${GRUB_CONFIG} ] ; then | |
rm ${GRUB_CONFIG} | |
fi | |
# copy this version of the configuration and update grub to | |
# reflect it. | |
cp -v ${GRUB_TEMPLATE} ${GRUB_CONFIG} && update-grub | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment