pfsense/pfsense — pull request #854 by icy (2013-11-12 23:36:42+00:00)
Title: local_sync_accounts: provides empty STDIN to pw userdel command

The /usr/sbin/pw command may wait for user input. For example,
if there is a manual crontab settings for :foobar account, then
when this account is requested to be deleted, the command will
ask if user wants to delete crontab settings for the account.

Because the command waits for user input, the boot process will
hang at the "Synchronizing user settings..." step, unless user
presses any key.

To avoid this problem, we use the /bin/echo command to give
empty input for /usr/bin/pw command. This is an alternative of
typing "no" or "n".

This is a not the best way. Maybe closing STDIN is good. Or
force users to change account settings from webUI.

See also #852 (pull request). Renato Botelho points out that
"pw userdel" will call "crontab -u %user -r" that is interative.
"pw groupdel" will never be interative, though.