Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 7 additions & 15 deletions configs/airootfs/etc/profile.d/pit-aliases.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,8 @@
#!/bin/bash
# Ferrari OS package manager aliases
# System update
alias pit-update='pit -Syu'
# Package installation
alias pit-install='pit -S'
# Package removal
alias pit-remove='pit -R'
# Package search
alias pit-search='pit -Ss'
# Clean package cache
alias pit-clean='pit -Sc'
# Package information
alias pit-info='pit -Si'
# List installed packages
alias pit-list='pit -Q'
alias update='pit -Syu'
alias install='pit -S'
alias remove='pit -R'
alias search='pit -Ss'
alias clean='pit -Sc'
alias info='pit -Si'
alias packages='pit -Q'
Comment on lines +2 to +8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Prevent alias collisions and improve naming consistency
Defining generic aliases like update, install, remove, search, clean, info, and packages will shadow common utilities and confuse users. I recommend the following improvements:

  1. Prefix aliases (e.g. pit-update, pit-install, …) to avoid collisions.
  2. Use consistent verb-based names (e.g. list or list-packages instead of the noun packages).
  3. Scope these aliases to interactive shells, wrapping them in a check such as:
+ if [[ $- == *i* ]]; then
-   alias update='pit -Syu'
+   alias pit-update='pit -Syu'
    alias pit-install='pit -S'
    alias pit-remove='pit -R'
    alias pit-search='pit -Ss'
    alias pit-clean='pit -Sc'
    alias pit-info='pit -Si'
-   alias packages='pit -Q'
+   alias pit-list='pit -Q'
+ fi

Committable suggestion skipped: line range outside the PR's diff.

2 changes: 1 addition & 1 deletion configs/airootfs/etc/ssh/sshd_config.d/10-archiso.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Allow root login using password authentication
PasswordAuthentication yes
PermitRootLogin yes
PermitRootLogin no
7 changes: 7 additions & 0 deletions configs/releng/airootfs/etc/ssh/sshd_config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
PermitRootLogin no
PasswordAuthentication no
AllowUsers yourusername
PermitEmptyPasswords no
ChallengeResponseAuthentication no
UsePAM yes
X11Forwarding no
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
enable sshd.service
enable sshdgenkeys.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[Unit]
Description=OpenSSH server daemon
After=network.target

[Service]
ExecStart=/usr/bin/sshd -D
ExecReload=/bin/kill -HUP $MAINPID
Restart=always
User=root

[Install]
WantedBy=multi-user.target
10 changes: 10 additions & 0 deletions configs/releng/airootfs/etc/systemd/system/sshdgenkeys.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[Unit]
Description=Generate SSH host keys
Before=sshd.service

[Service]
Type=oneshot
ExecStart=/usr/bin/ssh-keygen -A

[Install]
WantedBy=multi-user.target