1
Description: <short summary of the patch>
2
TODO: Put a short summary on the line above and replace this paragraph
3
with a longer explanation of this change. Complete the meta-information
4
with other relevant fields (see below for details). To make it easier, the
5
information below has been extracted from the changelog. Adjust it or drop
8
linkat-nova-unitat (14.04-0.4) trusty; urgency=low
10
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
11
Author: Pablo Vigo <pvigo@xtec.cat>
14
The information above should follow the Patch Tagging Guidelines, please
15
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
16
are templates for supplementary fields that you might want to add:
18
Origin: <vendor|upstream|other>, <url of original patch>
19
Bug: <url in upstream bugtracker>
20
Bug-Debian: http://bugs.debian.org/<bugnumber>
21
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
22
Forwarded: <no|not-needed|url proving that it has been forwarded>
23
Reviewed-By: <name and email of someone who approved the patch>
24
Last-Update: <YYYY-MM-DD>
26
--- linkat-nova-unitat-14.04.orig/linkat-nova-unitat.sh
27
+++ linkat-nova-unitat-14.04/linkat-nova-unitat.sh
28
@@ -9,21 +9,26 @@ else
32
-res=$(zenity --question --title="Nova unitat de xarxa SAMBA" --text="Aquest programa permet crear noves unitats\nde xarxa SAMBA al servidor de centre Linkat.\n\nVoleu continuar?")
33
-if [ "$res" -gt 1 ] ; then
34
+zenity --question --title="Nova unitat de xarxa SAMBA" --text="Aquest programa permet crear noves unitats\nde xarxa SAMBA al servidor de centre Linkat.\n\nVoleu continuar?"
35
+if [ "$?" -gt 0 ] ; then
39
export TEMPDIR=$(mktemp -d)
41
zenity --forms --title="Unitats de xarxa" --text="Crear nova unitat" --add-entry="Nom unitat" --add-entry="Grup LDAP"
42
-if [ "$?" -gt 1 ]; then
43
+if [ "$?" -gt 0 ]; then
47
NOVAUNITAT=$(echo $res | awk 'BEGIN { FS="|"; } {print $1; }')
48
NOUGRUP=$(echo $res | awk 'BEGIN { FS="|"; } {print $2; }')
50
+if [ "$NOVAUNITAT" == "" ] || [ "$NOUGRUP" == "" ] ; then
51
+ zenity --error --text="S'ha d'introduir un nom d'unitat i un nom de grup."
55
for i in "$NOVAUNITAT" "$NOUGRUP"
57
echo "$i" | grep -E " "