X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=grml_tips;h=5cce08e8f86961d0e8ab77fed35278894049c380;hb=570574686735940a520968f0480e294933d4b4ef;hp=4546d3c98d6b7a881625140dbdb61adb1d6d6693;hpb=250a5184541b90358179cd6494d61aa47c749928;p=grml-tips.git diff --git a/grml_tips b/grml_tips index 4546d3c..5cce08e 100644 --- a/grml_tips +++ b/grml_tips @@ -1311,6 +1311,10 @@ product ID when loading the usbserial module. Usage example: Bus 004 Device 008: ID 1199:6813 Sierra Wireless, Inc. # modprobe usbserial vendor=0x1199 product=0x6813 + +To get a list of available providers execute: + +# gcom -s -d /dev/ttyUSB0 /usr/share/doc/gcom/examples/operator -- hdparm - get/set hard disk parameters @@ -2651,7 +2655,8 @@ See: man grml-terminalserver + http://grml.org/terminalserver/ -- Debugging SSL communications: -% openssl s_client -connect server.adress:993 +% openssl s_client -connect server.adress:993 > output_file +% openssl x509 -noout -text -in output_file or @@ -2941,7 +2946,7 @@ host.example.com. 3600 IN A 192.168.1.1 2. Configure dns2tcpd on host.example.com.: # cat /etc/dns2tcpd.conf -listen = 192.168.1.1 #the ip dnstun should listen on +listen = 192.168.1.1 #the ip dns2tcpd should listen on port = 53 #" port " " " " user = nobody chroot = /tmp @@ -3001,3 +3006,54 @@ Hints: - Do not use interface names without ending 0 (otherwise startup fails). - Only chooss unique names for interfaces. -- +Find dangling symlinks using zsh: + +% ls **/*(-@) +-- +Use approx with runit supervision +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Install the packages: +# apt-get install approx runit + +Add user approxlog for the logging daemon: +# adduser --system --home /nonexistent --no-create-home approxlog + +Create config directory: +# mkdir /etc/sv/approx + +Use /var/run/sv.approx as supervise directory: +# ln -s /var/run/sv.approx /etc/sv/approx/supervise + +# cat > /etc/sv/approx/run << EOF +#!/bin/sh +echo 'approx starting' +exec approx -f 2>&1 +EOF + +You normally do not need a logging service for approx because it logs +to syslog too. So just for completion: +# mkdir -p /etc/sv/approx/log +# ln -s /var/run/sv.approx.log /etc/sv/approx/log/supervise +# cat > /etc/sv/approx/log/run << EOF +#!/bin/sh +set -e +LOG="/var/log/approx" +test -d "$LOG" || mkdir -p -m2750 "$LOG" && chown approxlog:adm "$LOG" +exec chpst -uapproxlog svlogd -tt -v "$LOG" +EOF + +Now activate the new approx service (will be started within 5s): +# ln -s /etc/sv/approx/ /var/service/ + +Make approx managed via runit available via init-script interface: +# dpkg-divert --local --rename /etc/init.d/approx +# ln -s /usr/bin/sv /etc/init.d/approx +-- +Remote-reboot a grml system using SysRQ via /proc (execute as root): + +eject &>/dev/null +umount -l /cdrom +eject /dev/cdrom +echo b > /proc/sysrq-trigger +--