# * settings
-if [[ $HISTFILE ]]; then
+if [[ $LESSHISTFILE == - ]]; then
+ HISTFILE=
+ c() { cd "$@"; }
+elif [[ $HISTFILE ]]; then
HISTFILE=$HOME/.bh
fi
path-add --ifexists --end /a/work/libremanage
path-add --ifexists --end /a/opt/adt-bundle*/tools /a/opt/adt-bundle*/platform-tools
path-add --ifexists --end /a/opt/scancode-toolkit-3.10.
+path-add --ifexists --end /p/bin
case $HOSTNAME in
sy|bo)
mnsnonet() {
ns=$1
+ lomh
if ! s ip netns list | grep -Fx nonet &>/dev/null; then
s ip netns add nonet
fi
arg+=(")")
dir=${1:-.}
# debug:
- #find $dir "${arg[@]}" -size +1M
- find $dir "${arg[@]}" -size +1M -exec mpv --profile=d '{}' +
+ #find $dir "${arg[@]}" -size +200k
+ find $dir "${arg[@]}" -size +200k -exec mpv --profile=d '{}' +
}
mpvs() {
mpv --profile=s "$@";
}
+r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
# only run on MAIL_HOST. simpler to keep this on one system.
r2eadd() { # usage: name url
# initial setup of rss2email:
# get up to date and dont send old entries now:
r2e run --no-send $1
}
-r2e() { command r2e -d /p/c/rss2email.json -c /p/c/rss2email.cfg "$@"; }
rspicy() { # usage: HOST DOMAIN
# connect to spice vm remote host. use vspicy for local host
m sudo nsenter -t $pid -n -m sudo -u $USER -i bash
}
+sdnbashroot() { # systemd namespace bash
+ local unit pid
+ if (( $# != 1 )); then
+ echo $0: error wrong number of args >&2
+ return 1
+ fi
+ unit=$1
+ pid=$(servicepid $unit)
+ m sudo nsenter -t $pid -n -m bash
+}
+
+
sdncmd() { # systemd namespace cmd
local unit pid
if (( $# <= 2 )); then