[kernel-tests] 08/73: Add simple utility to do root checking

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is an automated email from the git hooks/post-receive script.

jforbes pushed a commit to branch master
in repository kernel-tests.

commit b0092133cd6323c030150fe1db141043f13e28c5
Author: Josh Boyer <jwboyer@xxxxxxxxxx>
Date:   Tue Jun 12 12:49:31 2012 -0400

    Add simple utility to do root checking
---
 utils/root-check.sh | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/utils/root-check.sh b/utils/root-check.sh
new file mode 100644
index 0000000..9014e44
--- /dev/null
+++ b/utils/root-check.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+check_root() {
+	if [ $(id -u) -ne 0 ]
+	then
+		echo "You need to be root to run this test"
+		return 3
+	fi
+	return 0
+}

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.
_______________________________________________
kernel mailing list
kernel@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/admin/lists/kernel@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux