mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-17 01:54:49 +00:00
etc: pull the old switcheroo on login shells
This commit is contained in:
parent
377b5bd83d
commit
e5cae36f16
@ -398,7 +398,7 @@ function local_user_set(& $user) {
|
||||
/* configure shell type */
|
||||
/* Cases here should be ordered by most privileged to least privileged. */
|
||||
if (userHasPrivilege($user, "user-shell-access") || userHasPrivilege($user, "page-all")) {
|
||||
$user_shell = "/bin/tcsh";
|
||||
$user_shell = "/bin/csh";
|
||||
} elseif (userHasPrivilege($user, "user-copy-files")) {
|
||||
$user_shell = "/usr/local/bin/scponly";
|
||||
} elseif (userHasPrivilege($user, "user-ssh-tunnel")) {
|
||||
@ -418,7 +418,7 @@ function local_user_set(& $user) {
|
||||
|
||||
/* root user special handling */
|
||||
if ($user_uid == 0) {
|
||||
$cmd = "/usr/sbin/pw usermod -q -n root -s /bin/sh -H 0";
|
||||
$cmd = "/usr/sbin/pw usermod -q -n root -s /usr/local/etc/rc.initial -H 0";
|
||||
if($debug)
|
||||
log_error(sprintf(gettext("Running: %s"), $cmd));
|
||||
$fd = popen($cmd, "w");
|
||||
|
||||
@ -60,11 +60,11 @@ function rescue_detect_keypress() {
|
||||
if (in_array($key, array("r", "R"))) {
|
||||
putenv("TERM=cons25");
|
||||
echo "\n\nRecovery mode selected...\n";
|
||||
passthru("/usr/bin/env TERM=cons25 /bin/tcsh -c /usr/local/installer/lua_installer_rescue");
|
||||
passthru("/usr/bin/env TERM=cons25 /bin/csh -c /usr/local/installer/lua_installer_rescue");
|
||||
} elseif (in_array($key, array("i", "I"))) {
|
||||
putenv("TERM=cons25");
|
||||
echo "\n\nInstaller mode selected...\n";
|
||||
passthru("/usr/bin/env TERM=cons25 /bin/tcsh -c /usr/local/installer/lua_installer");
|
||||
passthru("/usr/bin/env TERM=cons25 /bin/csh -c /usr/local/installer/lua_installer");
|
||||
if(file_exists("/tmp/install_complete")) {
|
||||
passthru("/etc/rc.reboot");
|
||||
exit;
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
# If recovery console shell option has been specified
|
||||
if [ -f "/tmp/donotbootup" ]; then
|
||||
/usr/bin/env prompt="%B[%n@%m]%b%/(%h)||RecoveryConsoleShell: " /bin/tcsh
|
||||
/usr/bin/env prompt="%B[%n@%m]%b%/(%h)||RecoveryConsoleShell: " /bin/csh
|
||||
rm "/tmp/donotbootup"
|
||||
echo "Rebooting in 5 seconds... CTRL-C to abort..."
|
||||
sleep 5
|
||||
@ -110,7 +110,7 @@ case ${opmode} in
|
||||
/etc/rc.initial.ping
|
||||
;;
|
||||
8)
|
||||
/bin/tcsh
|
||||
/bin/csh
|
||||
;;
|
||||
9)
|
||||
/usr/local/sbin/pftop
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user