moved rootcheck after usage

This commit is contained in:
Bjorn Andersson 2006-06-11 13:59:55 +00:00
parent 5696b3c869
commit 41330f5f2b
1 changed files with 5 additions and 5 deletions

View File

@ -142,11 +142,6 @@ main(int argc, char **argv)
username = NULL;
foreground = 0;
if (geteuid() != 0) {
printf("Run as root and you'll be happy.\n");
usage();
}
while ((choice = getopt(argc, argv, "vfhu:")) != -1) {
switch(choice) {
case 'v':
@ -169,6 +164,11 @@ main(int argc, char **argv)
argc -= optind;
argv += optind;
if (geteuid() != 0) {
printf("Run as root and you'll be happy.\n");
usage();
}
if (argc != 1) {
usage();