Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

truenas-modify

Simple utility to enable or disable apt package management on TrueNAS when you require it.

Usage

Usage: ./truenas-modify COMMAND
Expects you can provide sudo password when asked.

Commands:
  apt-enable    Enable apt package management by making /usr writable
  apt-disable   Disable apt package management by making /usr read-only
  mount-rw      Mount a system directory read-write
  mount-ro      Mount a system directory read-only
  --help        Show this help message

Examples

# install a package manually
./truenas-modify apt-enable
sudo apt update
sudo apt install package-name
./truenas-modify apt-disable
# copy a binary to a space that is not /tmp, since /tmp is mounted as noexec
./truenas-modify mount-rw /opt
cp ~/downloads/app-v1.0.tar/app /opt/app
chmod +x /opt/app
./truenas-modify mount-ro /opt
/opt/app

What it does

apt-enable:

  • Remount /usr as read-write
  • Add executability to /bin/apt* and /usr/bin/dpkg
  • Remount /usr as read-only

apt-disable:

  • Remount /usr as read-write
  • Remove executability from /bin/apt* and /usr/bin/dpkg
  • Remount /usr as read-only

What it does not do

  • It does not modify PATH
  • It does not execute any apt commands, update the apt repository list, add repositories, nor update any packages

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages