X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Farchival%2Fsnarf_linux_config.pl;h=c6820ace4f104aa67f1528e77337459806e85cdc;hb=e1d7030b2a367caa4f85e31b0b221ee791cc9f13;hp=0fe2eacadda91aec9853651a0850ecc4fe01873d;hpb=ac05ad45bbf241264c1eca4467fb96189cb4d052;p=feisty_meow.git diff --git a/scripts/archival/snarf_linux_config.pl b/scripts/archival/snarf_linux_config.pl index 0fe2eaca..c6820ace 100644 --- a/scripts/archival/snarf_linux_config.pl +++ b/scripts/archival/snarf_linux_config.pl @@ -19,6 +19,13 @@ require "shared_snarfer.pl"; use Env qw(HOME); +# make sure we are running as root. otherwise we have no access to look at many things in /etc. +if ($< != 0) { + printf "This script must be run as root or sudo. Try this:\n"; + printf " sudo -E PERLLIB=\$PERLLIB perl \$FEISTY_MEOW_SCRIPTS/archival/snarf_linux_config.pl @ARGV\n"; + exit 1; +} + &initialize_snarfer; # get the number we use and increment it for the next use.