Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 443728 | Differences between
and this patch

Collapse All | Expand All

(-)services.old (-4 / +18 lines)
Lines 18-26 Link Here
18
linux_copy_init_script(){
18
linux_copy_init_script(){
19
	local full_init_script_path="$1/$2"
19
	local full_init_script_path="$1/$2"
20
	if [ ! -e "$full_init_script_path" ]; then
20
	if [ ! -e "$full_init_script_path" ]; then
21
		ln -s "$(full_path $base_path)/${platform_path}/${2}" "$full_init_script_path" 2> /dev/null
21
		ln -s "${platform_path}/${2}" "$full_init_script_path" 2> /dev/null
22
		local retval=$?
22
		local retval=$?
23
		[ $retval != 0 ] && log " !! Couldn't copy init script into ${1}!"
23
		[ $retval != 0 ] && log " !! Couldn't copy init script into ${1}!"
24
		chmod +x "${platform_path}/${2}"
24
		return $retval
25
		return $retval
25
	fi
26
	fi
26
	return 0
27
	return 0
Lines 73-83 Link Here
73
	[ $? == 0 ] && chkconfig --del $1
74
	[ $? == 0 ] && chkconfig --del $1
74
}
75
}
75
76
77
# We'll hijack arch's service load until upstreak adds a gentoo distro
76
arch_load_service(){
78
arch_load_service(){
77
	linux_copy_init_script '/etc/rc.d' $1
79
	linux_copy_init_script '/etc/init.d' $1
78
	[ $? == 0 ] && log " -- Prey network trigger has been copied to /etc/rc.d/$1. Remember to add it to /etc/rc.conf!"
80
	rc-update add prey-trigger default
79
}
81
}
80
82
81
arch_unload_service(){
83
arch_unload_service(){
82
	linux_remove_init_script '/etc/rc.d' $1
84
	rc-update delete prey-trigger 
85
        linux_remove_init_script '/etc/init.d' $1
86
}
87
88
gentoo_load_service(){
89
	linux_copy_init_script '/etc/init.d' $1
90
	rc-update add prey-trigger default
83
}
91
}
92
93
gentoo_unload_service(){
94
	rc-update delete prey-trigger 
95
        linux_remove_init_script '/etc/init.d' $1
96
}
97

Return to bug 443728