Project

General

Profile

Actions

Feature #14746

closed

Method for users to customize shell initialization behavior

Added by Steve Wheeler 8 months ago. Updated 5 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Operating System
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Plus Target Version:
23.09.1
Release Notes:
Default

Description

The .tcshrc file is created at every boot from /etc/skel/dot.tcshrc so to make changes persistent that file must be edited. However that file is overwritten at firmware upgrade.

To allow custom changes the file should reference a local file that can be added and changed as required.

See: https://netgate.slack.com/archives/C4GUL8CKF/p1623182176481600

Actions #1

Updated by Jim Pingle 8 months ago

  • Subject changed from Allow persistent changes to .tcshrc to Allow user shell init file content
  • Assignee set to Jim Pingle

I thought we already had an open feature request for this but I don't see it.

Rather than trying to accommodate someone replacing the entire file, we should just source a local version at the end of the existing files so that the user can override or define their own behavior. Rather than only do .tcshrc it should probably also do .cshrc, .shrc, and .profile since those are overwritten the same way.

Actions #2

Updated by Jim Pingle 7 months ago

I just pushed a commit that implements "local" versions of .profile, .shrc, and .tcshrc which are, respectively: .profile.local, .shrc.local, and .tcshrc.local in the user's home directory.

For logins with a menu, they are sourced before the menu is displayed.

The exact behavior of each file varies by shell, login type, and so on.

Actions #3

Updated by Jim Pingle 7 months ago

  • Subject changed from Allow user shell init file content to Method for users to customize shell initialization behavior
Actions #4

Updated by Jim Pingle 7 months ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100
Actions #5

Updated by Jim Pingle 7 months ago

  • Plus Target Version changed from 24.01 to 24.03
Actions #6

Updated by Christopher Cope 7 months ago

  • Status changed from Feedback to Resolved

Tested on

23.09-DEVELOPMENT (amd64)
built on Fri Sep 29 23:50:00 UTC 2023
FreeBSD 14.0-CURRENT

and it's functioning as expected. Marking resolved.

Actions #7

Updated by Jim Pingle 6 months ago

  • Target version changed from 2.8.0 to 2.7.1
Actions #8

Updated by Jim Pingle 5 months ago

  • Target version changed from 2.7.1 to 2.7.2
  • Plus Target Version changed from 24.03 to 23.09.1
Actions #9

Updated by Jim Pingle 5 months ago

  • Target version changed from 2.7.2 to 2.7.1
Actions

Also available in: Atom PDF