summaryrefslogtreecommitdiff
path: root/share
authorharlekin <harlekin>2004-10-05 21:47:16 (UTC)
committer harlekin <harlekin>2004-10-05 21:47:16 (UTC)
commit2d05ffb4bad93532e17b9350ff2d66fe3419cbe3 (patch) (unidiff)
tree2a6355ea308cf4d982b4efa0f520b49036d98050 /share
parent6f985725f027dc73fd71adc5cfc5b1d6a8428dc5 (diff)
downloadopie-2d05ffb4bad93532e17b9350ff2d66fe3419cbe3.zip
opie-2d05ffb4bad93532e17b9350ff2d66fe3419cbe3.tar.gz
opie-2d05ffb4bad93532e17b9350ff2d66fe3419cbe3.tar.bz2
scripts to fix the stupid embedix rom inittab behavior
Diffstat (limited to 'share') (more/less context) (ignore whitespace changes)
-rw-r--r--share/opie-console/sl6000_embedix_kill_0_1.sh29
-rw-r--r--share/opie-console/sl6000_embedix_restart_0_1.sh29
2 files changed, 58 insertions, 0 deletions
diff --git a/share/opie-console/sl6000_embedix_kill_0_1.sh b/share/opie-console/sl6000_embedix_kill_0_1.sh
new file mode 100644
index 0000000..369c23e
--- a/dev/null
+++ b/share/opie-console/sl6000_embedix_kill_0_1.sh
@@ -0,0 +1,29 @@
1#!/bin/bash
2
3# Use egrep to fid out if we need to comment /etc/sync/serialctl
4# from the inittab
5/usr/bin/env egrep -q '^pd:[0-9]:respawn:/etc/sync/serialctl' /etc/inittab 2>/dev/null
6
7# If egrep did not find an enabled /etc/sync/serialctl in /etc/inittab,
8# exit now (nothing to do)
9if [ $? -ne 0 ]; then
10 exit 0
11fi
12
13# This "cp -af" is to get the perms correct on /etc/inittab.tmp
14/usr/bin/env cp -af /etc/inittab /etc/inittab.tmp
15
16# This sed comments out the "etc/sync/serialctl" line
17/usr/bin/env sed 's%^\(pd:[0-9]:respawn:/etc/sync/serialctl\)%#\1%' /etc/inittab > /etc/inittab.tmp
18
19# We have not yet modified /etc/inittab, so to stay on the safe side
20# only modify it if the sed succeeded at what we asked it to do.
21if [ $? -eq 0 ]; then
22 # This "cp -af" puts the new /etc/inittab into place
23 /usr/bin/env cp -af /etc/inittab.tmp /etc/inittab
24 # Unlink the tmp file
25 rm /etc/inittab.tmp
26 # HUP init
27 /usr/bin/env kill -HUP 1
28fi
29
diff --git a/share/opie-console/sl6000_embedix_restart_0_1.sh b/share/opie-console/sl6000_embedix_restart_0_1.sh
new file mode 100644
index 0000000..4ce0e7e
--- a/dev/null
+++ b/share/opie-console/sl6000_embedix_restart_0_1.sh
@@ -0,0 +1,29 @@
1#!/bin/bash
2
3# Use egrep to fid out if we need to comment /etc/sync/serialctl
4# from the inittab
5/usr/bin/env egrep -q '^#pd:[0-9]:respawn:/etc/sync/serialctl' /etc/inittab 2>/dev/null
6
7# If egrep did not find an enabled /etc/sync/serialctl in /etc/inittab,
8# exit now (nothing to do)
9if [ $? -ne 0 ]; then
10 exit 0
11fi
12
13# This "cp -af" is to get the perms correct on /etc/inittab.tmp
14/usr/bin/env cp -af /etc/inittab /etc/inittab.tmp
15
16# This sed comments out the "etc/sync/serialctl" line
17/usr/bin/env sed 's%^#\(pd:[0-9]:respawn:/etc/sync/serialctl\)%\1%' /etc/inittab > /etc/inittab.tmp
18
19# We have not yet modified /etc/inittab, so to stay on the safe side
20# only modify it if the sed succeeded at what we asked it to do.
21if [ $? -eq 0 ]; then
22 # This "cp -af" puts the new /etc/inittab into place
23 /usr/bin/env cp -af /etc/inittab.tmp /etc/inittab
24 # Unlink the tmp file
25 rm /etc/inittab.tmp
26 # HUP init
27 /usr/bin/env kill -HUP 1
28fi
29