powerd(8) requires root permissions to run so notify the user if they

try to start it without this.

Submitted by:	Philip S. Schulz
MFC after:	2 days
This commit is contained in:
Nate Lawson 2005-07-25 16:43:12 +00:00
parent 1f320556fd
commit c996f586de
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148395

View File

@ -269,6 +269,10 @@ main(int argc, char * argv[])
vflag = 0;
apm_fd = -1;
/* User must be root to control frequencies. */
if (geteuid() != 0)
errx(1, "must be root to run");
while ((ch = getopt(argc, argv, "a:b:i:n:p:r:v")) != EOF)
switch (ch) {
case 'a':