View | Details | Raw Unified | Return to bug 35935
Collapse All | Expand All

(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/conffiles/bootsplash.py (-4 / +7 lines)
 Lines 1-9    Link Here 
1
import os
1
from subprocess import call
2
2
3
3
def postinst(baseConfig, changes):
4
def postinst(baseConfig, changes):
4
	theme = changes.get("bootsplash/theme", False)
5
	theme = changes.get("bootsplash/theme", False)
5
	if theme and type(()) == type(theme):
6
	try:
6
		old, new = theme
7
		old, new = theme
8
	except (TypeError, ValueError):
9
		pass
10
	else:
7
		if new:
11
		if new:
8
			os.system("plymouth-set-default-theme %s" % new)
12
			call(("plymouth-set-default-theme", "--rebuild-initrd", new))
9
			os.system("update-initramfs -u")
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/debian/changelog (-2 / +10 lines)
 Lines 1-3    Link Here 
1
univention-bootsplash (6.0.1-2) unstable; urgency=low
2
3
  * Bug #35935:
4
    - remove old logo
5
    - fix screen location of text
6
  * Fix shell quoting error
7
  * debian/*: remove no longer required files and code
8
9
 -- Philipp Hahn <hahn@univention.de>  Mon, 22 Sep 2014 11:34:18 +0200
10
1
univention-bootsplash (6.0.1-1) unstable; urgency=low
11
univention-bootsplash (6.0.1-1) unstable; urgency=low
2
12
3
  * new bootsplash layout (Bug #35935) 
13
  * new bootsplash layout (Bug #35935) 
 Lines 313-317   univention-bootsplash (0.1) unstable; urgency=low Link Here 
313
  * initial release
323
  * initial release
314
324
315
 -- Felix Meier <meier@univention.de>  Fri,  3 Dec 2004 17:02:27 +0100
325
 -- Felix Meier <meier@univention.de>  Fri,  3 Dec 2004 17:02:27 +0100
316
317
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/debian/univention-bootsplash.dirs (-2 lines)
 Lines 1-2    Link Here 
1
usr/share/plymouth/themes/ucs
2
etc
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/debian/univention-bootsplash.postinst (-26 / +3 lines)
 Lines 32-69    Link Here 
32
32
33
eval "$(univention-config-registry shell)"
33
eval "$(univention-config-registry shell)"
34
34
35
# update to ucs 3.0 with plymouth, can be removed after 3.0-0
36
if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 4.0.0-1; then
37
	univention-config-registry set bootsplash/theme="ucs"
38
39
	splash=false
40
	if echo $grub_append | grep -iq '\<splash\>'; then   
41
		splash=true
42
	fi
43
	if echo $grub_append | grep -iq '\<splash=silent\>'; then
44
		splash=true
45
	fi
46
	if echo $grub_append | grep -iq '\<nosplash\>'; then
47
		splash=false
48
	fi
49
	# remove splash stuff from grub/append
50
	new=$(echo $grub_append | sed 's|\<nosplash\>||g;s|\<splash=silent\>||g;s|\<splash\>||g')
51
	univention-config-registry set grub/append="$new"
52
	if [ "true" = "$splash" ]; then
53
		univention-config-registry set grub/bootsplash=splash
54
	else
55
		univention-config-registry set grub/bootsplash=nosplash
56
	fi
57
fi
58
59
60
univention-config-registry set \
35
univention-config-registry set \
61
	bootsplash/theme?"ucs" \
36
	bootsplash/theme?"ucs" \
62
	grub/bootsplash?splash
37
	grub/bootsplash?splash
63
38
64
#DEBHELPER#
39
#DEBHELPER#
65
40
66
update-initramfs -u
41
if [ -x /usr/sbin/update-initramfs ]; then
42
	update-initramfs -u
43
fi
67
44
68
if [ -x /usr/bin/update-grub ]; then
45
if [ -x /usr/bin/update-grub ]; then
69
	update-grub
46
	update-grub
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/ucs/ucs.plymouth (-5 / +2 lines)
 Lines 1-11    Link Here 
1
[Plymouth Theme]
1
[Plymouth Theme]
2
Name=Script
2
Name=UCS-4
3
Description=Script example plugin.
3
Description=Univention Corporate Server 4
4
ModuleName=script
4
ModuleName=script
5
5
6
[script]
6
[script]
7
ImageDir=/usr/share/plymouth/themes/ucs
7
ImageDir=/usr/share/plymouth/themes/ucs
8
ScriptFile=/usr/share/plymouth/themes/ucs/ucs.script
8
ScriptFile=/usr/share/plymouth/themes/ucs/ucs.script
9
10
[script-env-vars]
11
example_env_var=example env var value
(-)a/branches/ucs-4.0/ucs-4.0-0/base/univention-bootsplash/ucs/ucs.script (-24 / +22 lines)
 Lines 1-4    Link Here 
1
# This is an example plymouth plugin script
1
# This is the Univention Corporate Server 4 plymouth plugin script
2
2
3
# background image
3
# background image
4
bg.image = Image("bg.png");
4
bg.image = Image("bg.png");
 Lines 29-36   status = "normal"; Link Here 
29
29
30
line_height = Image.Text("AfpqtM").GetHeight();
30
line_height = Image.Text("AfpqtM").GetHeight();
31
31
32
# to determine the mode of operation plymouth was started in use Plymouth.GetMode 
32
# to determine the mode of operation plymouth was started in use Plymouth.GetMode
33
# which returns a string of one of: "boot", "shutdown", "suspend", "resume" or unknown. 
33
# which returns a string of one of: "boot", "shutdown", "suspend", "resume" or unknown.
34
#status = Plymouth.GetMode ();
34
#status = Plymouth.GetMode ();
35
35
36
##########
36
##########
 Lines 156-162   fun ask_dialog() { Link Here 
156
156
157
	for (i=0; i < ASK_PROMPT_LINES; i++) {
157
	for (i=0; i < ASK_PROMPT_LINES; i++) {
158
		prompt[i].sprite = Sprite();
158
		prompt[i].sprite = Sprite();
159
		prompt[i].sprite.SetPosition(10, 50 + (20 * i), 10000);
159
		prompt[i].sprite.SetPosition(10, 80 + (20 * i), 10000);
160
	}
160
	}
161
161
162
	prompt.setText = fun (string) {
162
	prompt.setText = fun (string) {
 Lines 192-198   fun ask_dialog() { Link Here 
192
			prompt.y + 20,
192
			prompt.y + 20,
193
			10000
193
			10000
194
		);
194
		);
195
	};	
195
	};
196
196
197
	global.ask.prompt = prompt;
197
	global.ask.prompt = prompt;
198
	global.ask.text = text;
198
	global.ask.text = text;
 Lines 206-221   fun dialog_setup() { Link Here 
206
	local.lock;
206
	local.lock;
207
	local.entry;
207
	local.entry;
208
	local.prompt;
208
	local.prompt;
209
	
209
210
	lock.image = Image("lock.png");
210
	lock.image = Image("lock.png");
211
	entry.image = Image("entry.png");
211
	entry.image = Image("entry.png");
212
	
212
213
	lock.sprite = Sprite(lock.image);
213
	lock.sprite = Sprite(lock.image);
214
	lock.x = Window.GetX() + Window.GetWidth()  / 2 - lock.image.GetWidth() / 2;
214
	lock.x = Window.GetX() + Window.GetWidth()  / 2 - lock.image.GetWidth() / 2;
215
	lock.y = Window.GetY() + Window.GetHeight() / 2 - global.box.image.GetHeight() / 3;
215
	lock.y = Window.GetY() + Window.GetHeight() / 2 - global.box.image.GetHeight() / 3;
216
	lock.z = 10000;
216
	lock.z = 10000;
217
	lock.sprite.SetPosition(lock.x, lock.y, lock.z);
217
	lock.sprite.SetPosition(lock.x, lock.y, lock.z);
218
	
218
219
	entry.sprite = Sprite(entry.image);
219
	entry.sprite = Sprite(entry.image);
220
	entry.x = Window.GetX() + Window.GetWidth()  / 2 - entry.image.GetWidth() / 2;
220
	entry.x = Window.GetX() + Window.GetWidth()  / 2 - entry.image.GetWidth() / 2;
221
	entry.y = Window.GetY() + Window.GetHeight() / 2 - entry.image.GetHeight() / 2;
221
	entry.y = Window.GetY() + Window.GetHeight() / 2 - entry.image.GetHeight() / 2;
 Lines 224-230   fun dialog_setup() { Link Here 
224
224
225
	for (i=0; i < PASSWORD_PROMPT_LINES; i++) {
225
	for (i=0; i < PASSWORD_PROMPT_LINES; i++) {
226
		prompt[i] = Sprite();
226
		prompt[i] = Sprite();
227
		prompt[i].SetPosition(10, 50 + (20 * i), 10000);
227
		prompt[i].SetPosition(10, 80 + (20 * i), 10000);
228
	}
228
	}
229
229
230
	prompt.setText = fun (string) {
230
	prompt.setText = fun (string) {
 Lines 238-244   fun dialog_setup() { Link Here 
238
			prompt[i].SetImage(msg);
238
			prompt[i].SetImage(msg);
239
		}
239
		}
240
	};
240
	};
241
	
241
242
	global.dialog.lock = lock;
242
	global.dialog.lock = lock;
243
	global.dialog.entry = entry;
243
	global.dialog.entry = entry;
244
	global.dialog.prompt = prompt;
244
	global.dialog.prompt = prompt;
 Lines 288-294   fun display_normal_callback () { Link Here 
288
	global.logo.sprite.SetOpacity(1.0);
288
	global.logo.sprite.SetOpacity(1.0);
289
}
289
}
290
290
291
# the callback function is called when the display should return to normal 
291
# the callback function is called when the display should return to normal
292
Plymouth.SetDisplayNormalFunction(display_normal_callback);
292
Plymouth.SetDisplayNormalFunction(display_normal_callback);
293
293
294
############
294
############
 Lines 329-335   fun display_password_callback (prompt, bullets) { Link Here 
329
	}
329
	}
330
}
330
}
331
331
332
# the callback function is called when the display should display a 
332
# the callback function is called when the display should display a
333
# password dialogue. First arg is prompt string, the second is the number of bullets.
333
# password dialogue. First arg is prompt string, the second is the number of bullets.
334
Plymouth.SetDisplayPasswordFunction(display_password_callback);
334
Plymouth.SetDisplayPasswordFunction(display_password_callback);
335
335
 Lines 339-345   Plymouth.SetDisplayPasswordFunction(display_password_callback); Link Here 
339
339
340
statusmsg.sprite = Sprite();
340
statusmsg.sprite = Sprite();
341
statusmsg.sprite.SetX(Window.GetX() + Window.GetWidth()  / 2 - box.image.GetWidth()  / 2 + 5);
341
statusmsg.sprite.SetX(Window.GetX() + Window.GetWidth()  / 2 - box.image.GetWidth()  / 2 + 5);
342
statusmsg.sprite.SetY(Window.GetY() + Window.GetHeight() / 2 + box.image.GetHeight() / 2);
342
statusmsg.sprite.SetY(Window.GetY() + Window.GetHeight() / 2 + box.image.GetHeight() / 2 + 40);
343
343
344
fun update_status_callback (text) {
344
fun update_status_callback (text) {
345
	local.image = Image.Text(text, 0, 0, 0);
345
	local.image = Image.Text(text, 0, 0, 0);
 Lines 360-371   fun update_status_callback (text) { Link Here 
360
		else
360
		else
361
			image = Image.Text("Checking disk " + device + " (" + progress + "% complete)", 0, 0, 0);
361
			image = Image.Text("Checking disk " + device + " (" + progress + "% complete)", 0, 0, 0);
362
	}
362
	}
363
	statusmsg.sprite.SetImage(image);	
363
	statusmsg.sprite.SetImage(image);
364
}
364
}
365
365
366
# the callback function is called with the new boot status string
366
# the callback function is called with the new boot status string
367
Plymouth.SetUpdateStatusFunction(update_status_callback);
367
Plymouth.SetUpdateStatusFunction(update_status_callback);
368
    
368
369
########
369
########
370
# quit #
370
# quit #
371
########
371
########
 Lines 397-403   fun question_callback (prompt, string) { Link Here 
397
	global.ask.text.setText(string);
397
	global.ask.text.setText(string);
398
}
398
}
399
399
400
# the callback function is called when the display should display a question 
400
# the callback function is called when the display should display a question
401
# dialogue. First arg is prompt string, the second is the entry contents.
401
# dialogue. First arg is prompt string, the second is the entry contents.
402
Plymouth.SetDisplayQuestionFunction(question_callback);
402
Plymouth.SetDisplayQuestionFunction(question_callback);
403
403
 Lines 405-418   Plymouth.SetDisplayQuestionFunction(question_callback); Link Here 
405
# message #
405
# message #
406
###########
406
###########
407
407
408
# message 
408
# message
409
message.sprite = Sprite();
409
message.sprite = Sprite();
410
message.sprite.SetPosition(10, 5, 10000);
410
message.sprite.SetPosition(10, 40, 10000);
411
message.maxLength = 100;
411
message.maxLength = 100;
412
412
413
# fsck action line
413
# fsck action line
414
message_action.sprite = Sprite();
414
message_action.sprite = Sprite();
415
message_action.sprite.SetPosition(10, 30, 10000);
415
message_action.sprite.SetPosition(10, 60, 10000);
416
message_action.maxLength = 100;
416
message_action.maxLength = 100;
417
417
418
fun message_callback (text) {
418
fun message_callback (text) {
 Lines 440-446   fun message_callback (text) { Link Here 
440
	}
440
	}
441
}
441
}
442
442
443
# he callback function is called when new message should be displayed. 
443
# the callback function is called when new message should be displayed.
444
# First arg is message to display.
444
# First arg is message to display.
445
Plymouth.SetMessageFunction(message_callback);
445
Plymouth.SetMessageFunction(message_callback);
446
446
 Lines 455-462   fun refresh_callback () { Link Here 
455
	index = Math.Int(logo.count % 48);
455
	index = Math.Int(logo.count % 48);
456
	global.logo.sprite.SetImage(logo[index].image);
456
	global.logo.sprite.SetImage(logo[index].image);
457
}
457
}
458
  
458
459
# calling Plymouth.SetRefreshFunction with a function will set that 
459
# calling Plymouth.SetRefreshFunction with a function will set that
460
# function to be called up to 50 times every second
460
# function to be called up to 50 times every second
461
Plymouth.SetRefreshFunction (refresh_callback);
461
Plymouth.SetRefreshFunction (refresh_callback);
462
463
- 

Return to bug 35935