diff --git a/in/other=WHEREAREMYFILES.in b/in/other=WHEREAREMYFILES.in index cec81a3..ce51f7c 100644 --- a/in/other=WHEREAREMYFILES.in +++ b/in/other=WHEREAREMYFILES.in @@ -1,13 +1,18 @@ WHERE ARE MY FILES?! -If you are reading this, you are probably wondering why your Wicd configuration -files are not here. What follows is a summary of the folders that Wicd uses. +If you are reading this in %VARLIB%, then you may ignore (but please don't +delete) this file. The only reason it is here is that it is definitely +constant between package updates. + +If you are reading this from your home directory, you are probably wondering +why your Wicd configuration files are not in ~/.wicd. What follows is a +summary of the folders that Wicd uses. For a more detailed (and complete) description what is in each directory, consult the man pages for wicd(8) and wicd-curses(8). ~/.wicd - User-dependent configuration files, only used by wicd-curses + User-dependent configuration files %ETC% Global configuration files diff --git a/in/scripts=wicd-client.in b/in/scripts=wicd-client.in index 776581f..a451b88 100755 --- a/in/scripts=wicd-client.in +++ b/in/scripts=wicd-client.in @@ -7,8 +7,8 @@ if [ ! -d "$HOME/.wicd" ]; then mkdir -p "$HOME/.wicd" fi # Make sure the user knows WHEREAREMYFILES ;-) -if [ -e "%DOCDIR%WHEREAREMYFILES" ] && [ ! -L "$HOME/.wicd/WHEREAREMYFILES" ]; then - ln -s "%DOCDIR%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES" +if [ -e "%VARLIB%WHEREAREMYFILES" ] && [ ! -L "$HOME/.wicd/WHEREAREMYFILES" ]; then + ln -s "%VARLIB%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES" fi if [ "$DISPLAY" = "" ] && [ -x "%BIN%wicd-curses" ]; then if [ ! -f "$HOME/.wicd/CLIENT_CURSES_WARNING" ]; then diff --git a/in/scripts=wicd-curses.in b/in/scripts=wicd-curses.in index 9b56c42..19ff689 100755 --- a/in/scripts=wicd-curses.in +++ b/in/scripts=wicd-curses.in @@ -1,2 +1,9 @@ #!/bin/bash +if [ ! -d "$HOME/.wicd" ]; then + mkdir -p "$HOME/.wicd" +fi +if [ -e "%VARLIB%WHEREAREMYFILES" ] && [ ! -L "$HOME/.wicd/WHEREAREMYFILES" ]; then + ln -s "%VARLIB%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES" +fi + exec python -O %LIB%wicd-curses.py $@ diff --git a/in/wicd=wpath.py.in b/in/wicd=wpath.py.in index 8f82101..a4f17ef 100755 --- a/in/wicd=wpath.py.in +++ b/in/wicd=wpath.py.in @@ -33,6 +33,7 @@ postconnectscripts = '%SCRIPTS%postconnect' images = '%IMAGES%' encryption = '%ENCRYPTION%' bin = '%BIN%' +varlib = '%VARLIB%' networks = '%NETWORKS%' log = '%LOG%' resume = '%RESUME%' diff --git a/setup.py b/setup.py index dd9f851..a880da2 100755 --- a/setup.py +++ b/setup.py @@ -68,6 +68,7 @@ class configure(Command): ('icons=', None, "set the base directory for the .desktop file's icons"), ('translations=', None, 'set the directory translations are stored in'), ('autostart=', None, 'set the directory that will be autostarted on desktop login'), + ('varlib=',None , 'set the path for wicd\'s variable state data'), ('init=', None, 'set the directory for the init file'), ('docdir=', None, 'set the directory for the documentation'), ('mandir=', None, 'set the directory for the man pages'), @@ -104,7 +105,8 @@ class configure(Command): self.bin = '/usr/bin/' self.sbin = '/usr/sbin/' self.backends = self.lib + 'backends' - self.networks = '/var/lib/wicd/configurations/' + self.varlib = '/var/lib/wicd/' + self.networks = self.varlib + 'configurations/' self.log = '/var/log/wicd/' self.resume = '/etc/acpi/resume.d/' self.suspend = '/etc/acpi/suspend.d/' @@ -438,7 +440,8 @@ try: data.append (( piddir, [] )) if not wpath.no_install_docs: data.append((wpath.docdir, ['INSTALL', 'LICENSE', 'AUTHORS', - 'README', 'CHANGES', 'other/WHEREAREMYFILES'])) + 'README', 'CHANGES', ])) + data.append((wpath.varlib, ['other/WHEREAREMYFILES'])) if not wpath.no_install_kde: data.append((wpath.kdedir, ['other/wicd-tray.desktop'])) if not wpath.no_install_init: