packages: synergy/synergy-client.init - do not use exit in xinitrc, use ret...

Elan Ruusamäe glen at pld-linux.org
Mon Jan 30 06:28:24 CET 2012


On 01/29/2012 11:35 PM, Arkadiusz Miśkiewicz wrote:
> On Sunday 29 of January 2012, glen wrote:
>> Author: glen                         Date: Sun Jan 29 21:09:23 2012 GMT
>> Module: packages                      Tag: HEAD
>> ---- Log message:
>> - do not use exit in xinitrc, use return instead
>>
>> ---- Files affected:
>> packages/synergy:
>>     synergy-client.init (1.4 ->  1.5)
>>
>> ---- Diffs:
>>
>> ================================================================
>> Index: packages/synergy/synergy-client.init
>> diff -u packages/synergy/synergy-client.init:1.4
>> packages/synergy/synergy-client.init:1.5 ---
>> packages/synergy/synergy-client.init:1.4	Mon Jan 23 21:16:14 2012 +++
>> packages/synergy/synergy-client.init	Sun Jan 29 22:09:18 2012
>> @@ -1,7 +1,20 @@
>>   #!/bin/sh
>>
>> -# Source function library
>> -. /etc/rc.d/init.d/functions
>> +# is_yes taken from rc-scripts
>> +is_yes()
>> +{
>> +	# Check value
>> +	case "$1" in
>> +	  yes|Yes|YES|true|True|TRUE|on|On|ON|Y|y|1)
>> +		# true returns zero
>> +		return 0
>> +		;;
>> +	  *)
>> +		# false returns one
>> +		return 1
>> +		;;
>> +	esac
>> +}
> What's the point of this?
those scripts are sourced in same context, the less they load and 
clobber globals the better

-- 
glen



More information about the pld-devel-en mailing list