projects
/
grml-tips.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b218520
)
Added remote-reboot via SysRQ, update of approx/runit
0.4.7
author
Michael Prokop
<mika@grml.org>
Sat, 27 Oct 2007 17:34:51 +0000
(19:34 +0200)
committer
Michael Prokop
<mika@grml.org>
Sat, 27 Oct 2007 17:34:51 +0000
(19:34 +0200)
debian/changelog
patch
|
blob
|
history
grml_tips
patch
|
blob
|
history
diff --git
a/debian/changelog
b/debian/changelog
index
bfe87b2
..
2e3c45e
100644
(file)
--- a/
debian/changelog
+++ b/
debian/changelog
@@
-6,6
+6,7
@@
grml-tips (0.4.7) unstable; urgency=low
- extend openssl tip
- extend gcom tip
- find dangling symlinks using zsh
- extend openssl tip
- extend gcom tip
- find dangling symlinks using zsh
+ - remote-reboot via SysRQ
[ Michael Gebetsroither ]
* Added tips:
[ Michael Gebetsroither ]
* Added tips:
diff --git
a/grml_tips
b/grml_tips
index
f8db64c
..
5cce08e
100644
(file)
--- a/
grml_tips
+++ b/
grml_tips
@@
-3010,38
+3010,50
@@
Find dangling symlinks using zsh:
% ls **/*(-@)
--
% ls **/*(-@)
--
-approx with runit supervision
+Use approx with runit supervision
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Install the packages:
# apt-get install approx runit
# apt-get install approx runit
-Add user approxlog for the logging daemon
+Add user approxlog for the logging daemon
:
# adduser --system --home /nonexistent --no-create-home approxlog
# adduser --system --home /nonexistent --no-create-home approxlog
-Create config directory
+Create config directory
:
# mkdir /etc/sv/approx
# mkdir /etc/sv/approx
-Use /var/run/sv.approx as supervise director
ies
+Use /var/run/sv.approx as supervise director
y:
# ln -s /var/run/sv.approx /etc/sv/approx/supervise
# ln -s /var/run/sv.approx /etc/sv/approx/supervise
-# cat
/etc/sv/approx/run
-#
#
!/bin/sh
+# cat
> /etc/sv/approx/run << EOF
+#!/bin/sh
echo 'approx starting'
exec approx -f 2>&1
echo 'approx starting'
exec approx -f 2>&1
+EOF
-You normally do not need a logging service for approx
, because it log
gs
-to syslog too. So just for completion
.
+You normally do not need a logging service for approx
because it lo
gs
+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
# mkdir -p /etc/sv/approx/log
# ln -s /var/run/sv.approx.log /etc/sv/approx/log/supervise
-# cat
/etc/sv/approx/log/run
+# 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"
#!/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)
+Now activate the new approx service (will be started within 5s)
:
# ln -s /etc/sv/approx/ /var/service/
# ln -s /etc/sv/approx/ /var/service/
-Make
the runit managed approx available with init-script interface.
+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
# 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
+--