/lib/rcscripts -> /lib/rc
This commit is contained in:
parent
987c72f12f
commit
77f9015f0b
@ -3,6 +3,12 @@
|
||||
|
||||
19 Sep 2007; Roy Marples <uberlord@gentoo.org>:
|
||||
|
||||
Change from /lib/rcscripts to /lib/rc and adjust our files so changing
|
||||
our libdir is much easier in future. This move makes sense it's so much
|
||||
more than a holding place for our scripts now. It also has the added
|
||||
benefit of not loading the splash plugin for rc4 and lower which is
|
||||
ABI incompatible with us now.
|
||||
|
||||
plugin hook function is now rc_plugin_hook instead of a name based
|
||||
on the name of the plugin.
|
||||
|
||||
|
12
Makefile
12
Makefile
@ -10,7 +10,7 @@
|
||||
SUBDIRS = conf.d etc init.d man net sh share src
|
||||
|
||||
NAME = baselayout
|
||||
VERSION = 2.0.0_rc4
|
||||
VERSION = 2.0.0_rc5
|
||||
|
||||
PKG = $(NAME)-$(VERSION)
|
||||
|
||||
@ -21,7 +21,7 @@ OS=BSD
|
||||
endif
|
||||
endif
|
||||
|
||||
BASE_DIRS = /$(LIB)/rcscripts/init.d /$(LIB)/rcscripts/tmp
|
||||
BASE_DIRS = $(RC_LIB)/init.d $(RC_LIB)/tmp
|
||||
KEEP_DIRS = /boot /home /mnt /root \
|
||||
/usr/local/bin /usr/local/sbin /usr/local/share/doc /usr/local/share/man \
|
||||
/var/lock /var/run
|
||||
@ -50,12 +50,12 @@ install::
|
||||
$(INSTALL_DIR) $(DESTDIR)/etc/runlevels/single || exit $$? ; \
|
||||
$(INSTALL_DIR) $(DESTDIR)/etc/runlevels/nonetwork || exit $$? ; \
|
||||
fi
|
||||
ln -snf ../../$(LIB)/rcscripts/sh/net.sh $(DESTDIR)/etc/init.d/$(NET_LO) || exit $$?
|
||||
ln -snf ../../$(LIB)/rcscripts/sh/functions.sh $(DESTDIR)/etc/init.d || exit $$?
|
||||
ln -snf ../../$(RC_LIB)/sh/net.sh $(DESTDIR)/etc/init.d/$(NET_LO) || exit $$?
|
||||
ln -snf ../../$(RC_LIB)/sh/functions.sh $(DESTDIR)/etc/init.d || exit $$?
|
||||
# Handle lib correctly
|
||||
if test $(LIB) != "lib" ; then \
|
||||
sed -i'.bak' -e 's,/lib/,/$(LIB)/,g' $(DESTDIR)/$(LIB)/rcscripts/sh/functions.sh || exit $$? ; \
|
||||
rm -f $(DESTDIR)/$(LIB)/rcscripts/sh/functions.sh.bak ; \
|
||||
sed -i'.bak' -e 's,/lib/,/$(LIB)/,g' $(DESTDIR)/$(RC_LIB)/sh/functions.sh || exit $$? ; \
|
||||
rm -f $(DESTDIR)/$(RC_LIB)/sh/functions.sh.bak ; \
|
||||
fi
|
||||
|
||||
layout:
|
||||
|
@ -4,6 +4,7 @@
|
||||
DESTDIR = /
|
||||
ROOT = /
|
||||
LIB = lib
|
||||
RC_LIB = /$(LIB)/rc
|
||||
|
||||
#
|
||||
# Recursive rules
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/net
|
||||
DIR = $(RC_LIB)/net
|
||||
FILES = ifconfig.sh iwconfig.sh
|
||||
|
||||
TOPDIR = ..
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/net
|
||||
DIR = $(RC_LIB)/net
|
||||
FILES = adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \
|
||||
ccwgroup.sh clip.sh ifconfig.sh ifplugd.sh ip6to4.sh ipppd.sh \
|
||||
iproute2.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh \
|
||||
|
@ -65,8 +65,11 @@ udhcpc_start() {
|
||||
;;
|
||||
esac
|
||||
|
||||
local script="${RC_LIBDIR}"/sh/udhcpc.sh
|
||||
[ -x "${script}" ] || script=/lib/rcscripts/sh/udhcpc.sh
|
||||
|
||||
eval "${x}" "${args}" --interface="${IFACE}" --now \
|
||||
--script="${RC_LIBDIR}"/sh/udhcpc.sh \
|
||||
--script="${script}" \
|
||||
--pidfile="${pidfile}" >/dev/null
|
||||
eend $? || return 1
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/net
|
||||
DIR = $(RC_LIB)/net
|
||||
FILES = dhclient.sh dhcpcd.sh macchanger.sh macnet.sh ssidnet.sh system.sh \
|
||||
wpa_supplicant.sh
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/sh
|
||||
DIR = $(RC_LIB)/sh
|
||||
EXES = init.sh
|
||||
|
||||
TOPDIR = ..
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/sh
|
||||
DIR = $(RC_LIB)/sh
|
||||
EXES = init.sh init-early.sh
|
||||
|
||||
TOPDIR = ..
|
||||
|
@ -1,4 +1,4 @@
|
||||
DIR = /$(LIB)/rcscripts/sh
|
||||
DIR = $(RC_LIB)/sh
|
||||
FILES = functions.sh init-functions.sh init-common-post.sh \
|
||||
rc-functions.sh rc-mount.sh
|
||||
EXES = gendepends.sh net.sh rc-mount.sh rc-help.sh runscript.sh
|
||||
|
@ -113,9 +113,9 @@ fi
|
||||
# This should solve both /sbin and /usr/sbin not present when
|
||||
# doing 'su -c foo', or for something like: PATH= rcscript start
|
||||
case "${PATH}" in
|
||||
/lib/rcscripts/bin:/bin:/sbin:/usr/bin:/usr/sbin) ;;
|
||||
/lib/rcscripts/bin:/bin:/sbin:/usr/bin:/usr/sbin:*) ;;
|
||||
*) export PATH="/lib/rcscripts/bin:/bin:/sbin:/usr/bin:/usr/sbin:${PATH}" ;;
|
||||
/lib/rc/bin:/bin:/sbin:/usr/bin:/usr/sbin) ;;
|
||||
/lib/rc/bin:/bin:/sbin:/usr/bin:/usr/sbin:*) ;;
|
||||
*) export PATH="/lib/rc/bin:/bin:/sbin:/usr/bin:/usr/sbin:${PATH}" ;;
|
||||
esac
|
||||
|
||||
for arg in "$@" ; do
|
||||
|
@ -2,12 +2,17 @@
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
has_addon() {
|
||||
[ -e "${RC_LIBDIR}/addons/$1.sh" ]
|
||||
[ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /lib/rcscripts/addons/"$1".sh ]
|
||||
}
|
||||
|
||||
import_addon() {
|
||||
has_addon "$1" || return 1
|
||||
if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then
|
||||
. "${RC_LIBDIR}/addons/$1.sh"
|
||||
elif [ -e /lib/rcscripts/addons/"$1".sh ]; then
|
||||
. /lib/rcscripts/addons/"$1".sh
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
start_addon() {
|
||||
@ -22,7 +27,7 @@ is_net_fs() {
|
||||
[ -z "$1" ] && return 1
|
||||
|
||||
local t=$(mountinfo --fstype "$1")
|
||||
for x in ${RC_NET_FS_LIST} ; do
|
||||
for x in ${RC_NET_FS_LIST}; do
|
||||
[ "${x}" = "${t}" ] && return 0
|
||||
done
|
||||
return 1
|
||||
@ -38,12 +43,12 @@ get_bootparam() {
|
||||
[ -z "${match}" -o ! -r /proc/cmdline ] && return 1
|
||||
|
||||
set -- $(cat /proc/cmdline)
|
||||
while [ -n "$1" ] ; do
|
||||
while [ -n "$1" ]; do
|
||||
case "$1" in
|
||||
gentoo=*)
|
||||
local params="${1##*=}"
|
||||
local IFS=, x=
|
||||
for x in ${params} ; do
|
||||
for x in ${params}; do
|
||||
[ "${x}" = "${match}" ] && return 0
|
||||
done
|
||||
;;
|
||||
|
11
src/Makefile
11
src/Makefile
@ -41,6 +41,7 @@ CFLAGS += -pedantic -std=c99 \
|
||||
|
||||
DESTDIR =
|
||||
LIB = lib
|
||||
RC_LIB = /$(LIB)/rc
|
||||
|
||||
# Set PAM = pam for pam support
|
||||
PAM =
|
||||
@ -134,13 +135,13 @@ install: $(TARGET)
|
||||
install -m 0755 -d $(DESTDIR)/sbin
|
||||
install -m 0755 $(SBIN_TARGETS) $(DESTDIR)/sbin
|
||||
ln -sf rc-update $(DESTDIR)/sbin/update-rc
|
||||
install -m 0755 -d $(DESTDIR)/$(LIB)/rcscripts/conf.d
|
||||
install -m 0644 $(SYS_WHITELIST) $(DESTDIR)/$(LIB)/rcscripts/conf.d
|
||||
install -m 0755 -d $(DESTDIR)/$(LIB)/rcscripts/bin
|
||||
install -m 0755 -d $(DESTDIR)/$(RC_LIB)/conf.d
|
||||
install -m 0644 $(SYS_WHITELIST) $(DESTDIR)/$(RC_LIB)/conf.d
|
||||
install -m 0755 -d $(DESTDIR)/$(RC_LIB)/bin
|
||||
for x in $(BINLINKS); do ln -sf ../sbin/rc $(DESTDIR)/bin/$$x; done
|
||||
for x in $(SBINLINKS); do ln -sf rc $(DESTDIR)/sbin/$$x; done
|
||||
for x in $(RCLINKS); do ln -sf ../../../sbin/rc $(DESTDIR)/$(LIB)/rcscripts/bin/$$x; done
|
||||
if test "$(PAM)" != "pam" ; then \
|
||||
for x in $(RCLINKS); do ln -sf ../../../sbin/rc $(DESTDIR)/$(RC_LIB)/bin/$$x; done
|
||||
if test "$(PAM)" = "pam" ; then \
|
||||
install -m 0755 -d $(DESTDIR)/etc/pam.d ; \
|
||||
install -m 0644 start-stop-daemon.pam $(DESTDIR)/etc/pam.d/start-stop-daemon ; \
|
||||
fi
|
||||
|
@ -14,7 +14,7 @@
|
||||
#define RC_LEVEL_BOOT "boot"
|
||||
#define RC_LEVEL_DEFAULT "default"
|
||||
|
||||
#define RC_LIBDIR "/" LIB "/rcscripts"
|
||||
#define RC_LIBDIR "/" LIB "/rc"
|
||||
#define RC_SVCDIR RC_LIBDIR "/init.d"
|
||||
#define RC_DEPTREE RC_SVCDIR "/deptree"
|
||||
#define RC_RUNLEVELDIR "/etc/runlevels"
|
||||
|
Loading…
Reference in New Issue
Block a user