From a176c84373abecf913608be5e112eb2bd3c1e1f3 Mon Sep 17 00:00:00 2001 From: imdano <> Date: Sat, 19 Apr 2008 09:09:15 +0000 Subject: [PATCH] Fixed bug where building with setup.py wouldn't add rcX symlinks to init.d, so wicd wouldn't start at boot. --- other/postinst | 19 +++++++++++++++++++ setup.py | 4 ++++ 2 files changed, 23 insertions(+) create mode 100755 other/postinst diff --git a/other/postinst b/other/postinst new file mode 100755 index 0000000..8e40b17 --- /dev/null +++ b/other/postinst @@ -0,0 +1,19 @@ +#!/bin/sh +#stop daemon! +/etc/init.d/wicd stop + +#remove because we changed stuff +update-rc.d -f wicd remove + +#remove pyc files that screw things up sometimes +#there shouldn't be any there, but it never hurts to check +#they may exist if you are upgrading wicd +rm -rf /opt/wicd/*.pyc + +#add us to the startup +#add us to 80 because sometimes dbus starts +#later then 20, so that causes problems +update-rc.d wicd start 80 2 3 4 5 . stop 20 0 1 6 . + +#start the daemon +/etc/init.d/wicd start diff --git a/setup.py b/setup.py index 615280f..02cc945 100755 --- a/setup.py +++ b/setup.py @@ -81,3 +81,7 @@ connect at startup to any preferred network within range. py_modules=['networking', 'misc', 'wnettools', 'wpath'], data_files=data ) + +print "Running post-install configuration..." +os.system("other/postinst") +print 'Done.'