#!/usr/bin/perl $user=vscan; $group=nogroup; if (`grep ^vscan: /etc/passwd` eq "") { print "You need a user \"${user}\".\n"; if (yesno("Would you like me to create it", "y")) { system ("/usr/sbin/pw useradd ${user} -g ${group} -h - -d /nonexistent -s /nonexistent -c \"AMaViS Virus Scanner\" || exit"); print "Done.\n"; } else { print "Please create it, and try again.\n"; exit 1; }; } else { print "You already have a user \"${user}\", so I will use it.\n"; }; sub yesno() { my ($mes, $def) = @_; print "$mes [$def]? "; $answer = ; chomp($answer); if ($answer eq "") { $answer = "y"; }; if ($answer=~/^y/i) { return 1; }; return 0; }; el='vcs-git' href='https://www.csie.ntu.edu.tw/~b01902062/git/freebsd-ports-graphics' title='freebsd-ports-graphics Git repository'/>
aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* - In Uses/linux.mk use the loop variable directly when appending totijl2016-09-071-1/+1