|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|
|||
First few, of probably many more, questions
Greetings all,
this is my second foray into OpenBSD land. Although not as easy to install as advertised, namely because of my insistence on setting the system the way I wanted to including dual boot with Windows, with some searching I managed. Amazingly, every feature I tested so far works. Some of the searches led me to this forum, and after observing for a while, I subscribed. One of the features I miss from ZFS is snapshots. Since I was unable to find any tool, I decided to write a script based on Mark Rubel's work at http://www.mikerubel.org/computers/rsync_snapshots/. Since this were to be my first script, I decided to stand on the shoulders of giants, i.e., steal from others. This did not turn so well since most of the script use bash, which is absent from base OpenBSD. Although I managed to find some tutorials on ksh to write the script, I wonder if this is the best way forward for portability reasons. Hence the first question: 1. What to do about scripts? Install bash for scripts? Or sacrifice portability and learn ksh? Then the second problem arose. OpenBSD does not appear to have an /opt directory, hence the second question: 2. Where to store scripts and supporting files, e.g., configuration needed by the script? Finally, since this is my first script, would someone be willing to look over it, to check for obvious errors and other clumsiness? Kindest regards, M |
|
|||
1. If you want, install bash, if you want, learn sh (or ksh).
2. If you want /opt directory, just create it (or even create a partition and mount it to /opt, but you'll have to change some settings if you're going to install third-party software there), otherwise look at /usr/local/, it has everything from installed packages.
__________________
mazocomp$ uname -a OpenBSD mazocomp.lan 6.3 GENERIC.MP#47 amd64 mazocomp$ |
|
|||
I would use /bin/sh, that's the most portable. Most of the time, scripts start with /bin/bash because that's mostly what linux users know. They often don't actually use anything bash specific. Don't use ksh unless you need something more than what sh provides.
I put everything under /usr/local since the system doesn't touch anything there on upgrades. For "snapshots", I recommend sysutils/borgbackup as it does incremental backups and deduplication. Saves a ton of space and you can go back in time for an older version of a file. |
|
|||
Greetings all,
thank you for your replies. I like the idea of using the /bin/sh for the scripts, due to the portability. I also like the idea of using /usr/local, but as I checked HIER(7), it states that the /usr/local is used for "Local executables, libraries, etc." so since the system installs some of them, e.g., packages, thus potentially overwriting changes during upgrades. Hi TronDD, thank you for the sysutils/borgbackup recommendation, I will check whether it allows for some of the peculiar requirements that I have. Kindest regards, M |
|
|||
Quote:
Quote:
Quote:
Code:
# pkg_add bash Where ever you want? Your $HOME? /etc? Make an /opt directory yourself? |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Two PF questions | sparker | OpenBSD Security | 5 | 9th November 2009 08:01 AM |
Some Questions ?? | ultranothing | OpenBSD Security | 6 | 4th September 2009 04:59 PM |
Questions about BSD (in general) | fbsduser | FreeBSD General | 16 | 21st January 2009 02:41 PM |
FTP ruleset questions | hitete | OpenBSD Security | 2 | 25th November 2008 05:30 PM |
A few questions on OpenBSD? | php111 | OpenBSD General | 24 | 1st November 2008 09:18 AM |