#!/usr/bin/perl
# cpanel - checkbashshell Copyright(c) 2008 cPanel, Inc.
# All rights Reserved.
# copyright@cpanel.net http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
open( SHELLS, '<', '/etc/shells' );
while (<SHELLS>) {
if (/^\/bin\/bash/) {
close(SHELLS);
exit;
}
}
close(SHELLS);
open( SHELLS, '>>', '/etc/shells' );
print SHELLS "/bin/bash\n";
close(SHELLS);
exit;