/usr/sbin/wag-profiles.sh

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

/usr/sbin/wag-profiles.sh

Karl Godt
Administrator
I am running /usr/sbin/wag-profiles.sh in the console and all I get is a never ending loop of

** ERROR **: gtkdialog: Error in line 6, near token '</label>': syntax error

In both Macpup Foxy3 and current Slacko-5.6.3 .

It appears that locale 'isation L_LABEL 's are missing .

In slacko's line 351 there is the buildProfilesWindow function pulling in that error , same function on Macpup .
export NETWIZ_Profiles_Window="<window title=\"$L_TITLE_Puppy_Network_Wizard\" icon-name=\"gtk-network\" window-position=\"1\">
<vbox>
        <hbox>
                <text use-markup=\"true\"><label>\"$L_TEXT_Profiles_Window\"</label></text>
                <button>
                        <label>$L_BUTTON_Scan</label>
I can't see that some label building script gets sourced .

Any ideas ?

/usr/sbin/wag-profiles.sh gets sourced by some rc.network scripts for it's functions .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /usr/sbin/wag-profiles.sh

01micko
Administrator
Karl

In my opinion, it should not be in an executable path at all, it is only a functions library. It doesn't need a shebang or executable permissions. I suppose if those were removed and but it was left in the path it would be no harm.

Have a look at the net  /usr/sbin/net-setup.sh. It is sourced from there. For some reason scanpci is still called in that script, that needs to be fixed as scanpci doesn't work properly any more and is removed.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /usr/sbin/wag-profiles.sh

mavrothal
In reply to this post by Karl Godt
$L_BUTTON_Scan definition is coming from the net-setup-2012-1101.pet in /usr/share/locale/2_letter Country_Code/LC_MESSAGES/net-setup.mo.
Do you have it for your locale?
Also usually wag_profile.sh is called from another script. Is that the way you run it?
Run it by itself will not know where to find the labels, I think
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /usr/sbin/wag-profiles.sh

mavrothal
In reply to this post by 01micko
That's what happens when you take too long to write a message.
Damn real life :-P
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /usr/sbin/wag-profiles.sh

Karl Godt
Administrator
In reply to this post by 01micko
Similar with gettext.sh

But I like it with bang, since it shows up in rox and geany as script, not plain text file .

# If ran by itself it shows the interface, Otherwise it's only used as a function library
CURRENT_CONTEXT=$(expr "$0" : '.*/\(.*\)$' )
if [ "${CURRENT_CONTEXT}" = "wag-profiles.sh" ] ; then
        INTERFACE="$1"
        DEBUG_OUTPUT="/dev/stderr"
        SHORT_LANG="${LANG%%_*}"
        if [ -f /usr/share/locale/$SHORT_LANG/LC_MESSAGES/net-setup.mo ] ; then
        . /usr/share/locale/$SHORT_LANG/LC_MESSAGES/net-setup.mo
        elif [ -f /usr/share/locale/en/LC_MESSAGES/net-setup.mo ] ; then
        . /usr/share/locale/en/LC_MESSAGES/net-setup.mo
        else
        echo "$0: Need net-setup.mo in /usr/share/locale/*/LC_MESSAGES/ ."
        echo "Please install net_setup-20111016.pet or net_setup-20121101.pet"
        echo "from ftp://ftp.nluug.nl/mirror/ibiblio/distributions/quirky/pet_packages-noarch/ ."
        exit 1
        fi
        showProfilesWindow "$1"
fi
Could look like that at the very end ..

CURRENT_CONTEXT=$(expr "$0" : '.*/\(.*\)$' ) never have seen such,
needs to play with that , similar to ${0%/*} or basename $0 to distinguish from being sourced or run .
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: /usr/sbin/wag-profiles.sh

Karl Godt
Administrator
In reply to this post by mavrothal
Thanks, found it on
ftp://ftp.nluug.nl/mirror/ibiblio/distributions/quirky/pet_packages-noarch/

Have installed that already as en and ja .mo 's .

# If ran by itself it shows the interface, Otherwise it's only used as a function library
CURRENT_CONTEXT=$(expr "$0" : '.*/\(.*\)$' )
if [ "${CURRENT_CONTEXT}" = "wag-profiles.sh" ] ; then
        INTERFACE="$1"
        DEBUG_OUTPUT="/dev/stderr"
        SHORT_LANG="${LANG%%_*}"
        if [ -f /usr/share/locale/$SHORT_LANG/LC_MESSAGES/net-setup.mo ] ; then
        . /usr/share/locale/$SHORT_LANG/LC_MESSAGES/net-setup.mo
        elif [ -f /usr/share/locale/en/LC_MESSAGES/net-setup.mo ] ; then
        . /usr/share/locale/en/LC_MESSAGES/net-setup.mo
        else
        echo "$0: Need net-setup.mo in /usr/share/locale/*/LC_MESSAGES/ ."
        echo "Please install net_setup-20111016.pet or net_setup-20121101.pet"
        echo "from ftp://ftp.nluug.nl/mirror/ibiblio/distributions/quirky/pet_packages-noarch/ ."
        exit 1
        fi
        showProfilesWindow "$1"
fi
Loading...