~matttbe/wicd/ubuntu_python27

« back to all changes in this revision

Viewing changes to .pc/05-use_binsh.patch/in/scripts=wicd-client.in

  • Committer: Bazaar Package Importer
  • Author(s): David Paleino
  • Date: 2010-03-05 18:12:51 UTC
  • mfrom: (8.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20100305181251-0fcsn0sty5oy8wlq
Tags: 1.7.0+ds1-2
Fix RC bug: daemon doesn't start anymore because copy.deepcopy()
fails with the iniparse object, coming from 20-use_iniparse.patch.
Bug 568326 reopened. (Closes: #572599)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
BOLD=$(tput bold)
 
3
BLUE=$(tput setaf 4)
 
4
NC=$(tput sgr0)
 
5
# check_firstrun()
 
6
if [ ! -d "$HOME/.wicd" ]; then
 
7
    mkdir -p "$HOME/.wicd"
 
8
fi
 
9
# Make sure the user knows WHEREAREMYFILES ;-)
 
10
if [ -e "%VARLIB%WHEREAREMYFILES" ] && [ ! -L "$HOME/.wicd/WHEREAREMYFILES" ]; then
 
11
    ln -s "%VARLIB%WHEREAREMYFILES" "$HOME/.wicd/WHEREAREMYFILES"
 
12
fi
 
13
if [ "$DISPLAY" = "" ]; then
 
14
    if [ -x "%BIN%wicd-curses" ]; then
 
15
        if [ ! -f "$HOME/.wicd/CLIENT_CURSES_WARNING" ]; then
 
16
            printf "NOTICE: You do not have an X server active on this console, \n"
 
17
            printf "so ${BOLD}${BLUE}wicd-curses${NC} will be started instead. \n"
 
18
            printf "Please see the wicd-client and/or wicd-curses manual pages \n"
 
19
            printf "for more information about this error and resulting message. \n"
 
20
            printf "\n" 
 
21
            printf "This message will not be displayed again. \n"
 
22
            printf "Press enter to continue... \n"
 
23
 
 
24
            read _junk
 
25
            cat >> "$HOME/.wicd/CLIENT_CURSES_WARNING" << EOF 
 
26
The wicd-client script checks for the existence of this file to determine
 
27
whether it should warn the user before launching wicd-curses instead, in 
 
28
the event of the gui client being launched outside of the X Window environment.
 
29
 
 
30
If you delete this file, then wicd-client will print the warning if it is 
 
31
launched outside of X (and then recreate this file again).
 
32
EOF
 
33
        fi
 
34
        exec %BIN%wicd-curses $@
 
35
    
 
36
    else
 
37
        printf "NOTICE: You do not have an X server active on this console, \n"
 
38
        printf "but you do not appear to have ${BOLD}${BLUE}wicd-curses${NC}\n"
 
39
        printf "installed on this system.  We'd normally be running it here.\n"
 
40
        printf "Please see the wicd-client manual page for more information.\n"
 
41
 
 
42
    fi
 
43
else
 
44
    exec %BIN%wicd-gtk $@
 
45
fi