mirror of
https://gitea.com/mcereda/oam.git
synced 2026-02-28 05:54:24 +00:00
feat: freebsd examples and improved knowledge
This commit is contained in:
36
examples/freebsd.initial-config.sh
Normal file
36
examples/freebsd.initial-config.sh
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ "$(id -ru)" -eq 0 ]
|
||||
then
|
||||
echo "Run this again as 'root'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Package management
|
||||
|
||||
pkg bootstrap
|
||||
pkg update
|
||||
pkg install -y \
|
||||
'vim' \
|
||||
'zsh' 'zsh-autosuggestions' 'zsh-completions' 'zsh-navigation-tools' 'zsh-syntax-highlighting'
|
||||
|
||||
# Non-'root' user management
|
||||
|
||||
pw groupmod 'wheel' -m 'username'
|
||||
cat > '/home/username/.zshrc' <<-EOF
|
||||
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
source /usr/local/share/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh
|
||||
|
||||
HISTFILE=~/.histfile
|
||||
HISTSIZE=100000
|
||||
SAVEHIST=100000
|
||||
bindkey -e
|
||||
|
||||
zstyle :compinstall filename ~/.zshrc
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
EOF
|
||||
chown 'username':'usergroup' '/home/username/.zshrc'
|
||||
chmod 'u=rw,go=r' '/home/username/.zshrc'
|
||||
chpass -s "$(grep 'bin/zsh' '/etc/shells')" 'username'
|
||||
24
examples/freebsd.virtualbox.guest-additions.sh
Normal file
24
examples/freebsd.virtualbox.guest-additions.sh
Normal file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
if [ "$(id -ru)" -eq 0 ]
|
||||
then
|
||||
echo "Run this again as 'root'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Package management
|
||||
# Use 'virtualbox-ose-additions-nox11' for console-only systems.
|
||||
|
||||
pkg bootstrap
|
||||
pkg update
|
||||
pkg install -y 'virtualbox-ose-additions'
|
||||
|
||||
# Start VirtualBox services at boot
|
||||
|
||||
sysrc vboxguest_enable="YES"
|
||||
sysrc vboxservice_enable="YES"
|
||||
|
||||
# NTP workaround
|
||||
# Needed if NTP or NTPDate are used
|
||||
|
||||
sysrc vboxservice_flags="--disable-timesync"
|
||||
Reference in New Issue
Block a user