From 504479d7e485c32639eebc7f90c69b55a12506ab Mon Sep 17 00:00:00 2001 From: tonnesen Date: Fri, 5 Jul 2002 19:18:16 +0000 Subject: [PATCH] Added check that programs are being run as root. --- installer.pl | 4 ++++ koha.upgrade | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/installer.pl b/installer.pl index 92a0080558..5796ec3766 100644 --- a/installer.pl +++ b/installer.pl @@ -3,6 +3,10 @@ use diagnostics; use strict; # please develop with the strict pragma +if ($<) { + print "\n\nYou must run koha.upgrade as root.\n\n"; + exit; +} unless ($< == 0) { print "You must be root to run this script.\n"; exit 1; diff --git a/koha.upgrade b/koha.upgrade index e948a0b673..e15274620e 100644 --- a/koha.upgrade +++ b/koha.upgrade @@ -1,5 +1,13 @@ #!/usr/bin/perl -w +use diagnostics; +use strict; # please develop with the strict pragma + +if ($<) { + print "\n\nYou must run koha.upgrade as root.\n\n"; + exit; +} + my %configfile; open (KC, "/etc/koha.conf"); while () { -- 2.39.5