summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaditya Bagga <aaditya_gnulinux@zoho.com>2018-11-07 14:26:23 +0530
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-11-30 21:07:55 +0700
commit5679f858c08d713fed6c7785a6f3ad7ae165e421 (patch)
tree3750dc7b006e4f8da8298daa5ec6d45bd65a58bb
parent8f86af26b34ecd01fc5d80b4e073814712d672d7 (diff)
downloadslackbuilds-5679f858c08d713fed6c7785a6f3ad7ae165e421.tar.gz
system/openrc: Updated for version 0.39.2 + SYSCONFDIR changed.
-rw-r--r--system/openrc/README6
-rw-r--r--system/openrc/README.Slackware42
-rw-r--r--system/openrc/doinst.sh8
-rw-r--r--system/openrc/openrc.SlackBuild13
-rw-r--r--system/openrc/openrc.info6
5 files changed, 53 insertions, 22 deletions
diff --git a/system/openrc/README b/system/openrc/README
index 595317b16b..ff976bf47e 100644
--- a/system/openrc/README
+++ b/system/openrc/README
@@ -1,6 +1,8 @@
-OpenRC is a dependency based init system that works with the system provided
-init program, normally /sbin/init (sysvinit in Slackware).
+OpenRC is a dependency based service manager that works with the system provided
+init system.
For installation instructions see README.Slackware.
+Services for OpenRC can be found in the openrc-services package.
+
For more information see http://docs.slackware.com/howtos:general_admin:openrc
diff --git a/system/openrc/README.Slackware b/system/openrc/README.Slackware
index 72b655e89b..64a005df16 100644
--- a/system/openrc/README.Slackware
+++ b/system/openrc/README.Slackware
@@ -1,8 +1,38 @@
-Before installing OpenRC, the /etc/init.d folder would need to be moved out, ie:
-# mv /etc/init.d /etc/init.d-bak
+After installing,
-After installing, /etc/inittab would need to be replaced. The old one can be backed up:
-# cp /etc/inittab /etc/inittab.sysvinit
-# mv /etc/inittab.new /etc/inittab
+1. Setup essential services:
-Services for OpenRC can be found in the openrc-services package.
+ # main tty
+ ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty1
+ /sbin/rc-update add agetty.tty1 default
+
+ cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.tty1
+ echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.tty1
+
+ # additional ttys
+ for i in {2..6}; do
+ ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.tty${i}
+ /sbin/rc-update add agetty.tty${i} default
+ done
+
+ # serial tty (for servers)
+ ln -s /etc/openrc/init.d/agetty /etc/openrc/init.d/agetty.ttyS0
+ /sbin/rc-update add agetty.ttyS0 default
+
+ cp /etc/openrc/conf.d/agetty /etc/openrc/conf.d/agetty.ttyS0
+ echo 'agetty_options="--noclear"' >> /etc/openrc/conf.d/agetty.ttyS0
+
+
+2. Add the following to boot parameters (via /etc/lilo.conf for lilo
+ or /etc/default/grub for grub):
+
+ init=/sbin/openrc-init
+
+Regenerate boot configuration ('lilo -v' or 'grub-mkconfig -o /boot/grub/grub.cfg')
+
+3. Reboot!
+
+## Note
+
+If migrating to OpenRC 0.39+ from previous versions, please check:
+https://docs.slackware.com/talk:howtos:general_admin:openrc#migrating_to_openrc_039_from_previous_versions
diff --git a/system/openrc/doinst.sh b/system/openrc/doinst.sh
index bae7f2e322..36f86cdbce 100644
--- a/system/openrc/doinst.sh
+++ b/system/openrc/doinst.sh
@@ -12,16 +12,16 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-BACKUP_FILE=(inittab rc.conf logrotate.d/openrc)
-BACKUP_CONF=(bootmisc consolefont devfs dmesg fsck hostname hwclock keymaps killprocs localmount modules mtab net-online netmount network staticroute swap urandom)
+BACKUP_FILE=(openrc/rc.conf logrotate.d/openrc)
+BACKUP_CONF=(agetty bootmisc consolefont devfs dmesg fsck hostname hwclock keymaps killprocs localmount modules mtab net-online netmount network staticroute swap urandom)
for file in "${BACKUP_FILE[@]}"; do
config "etc/${file}.new"
done
for file in "${BACKUP_CONF[@]}"; do
- config "etc/conf.d/${file}.new"
+ config "etc/openrc/conf.d/${file}.new"
done
# enable cgroups service as required by openrc 0.35+
-[ ! -e etc/runlevels/sysinit/cgroups ] && ln -s /etc/init.d/cgroups etc/runlevels/sysinit/cgroups
+[ ! -e etc/openrc/runlevels/sysinit/cgroups ] && ln -s /etc/openrc/init.d/cgroups etc/openrc/runlevels/sysinit/cgroups
diff --git a/system/openrc/openrc.SlackBuild b/system/openrc/openrc.SlackBuild
index 088f1cbe06..556197b760 100644
--- a/system/openrc/openrc.SlackBuild
+++ b/system/openrc/openrc.SlackBuild
@@ -24,8 +24,8 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=openrc
-VERSION=${VERSION:-0.35.5}
-BUILD=${BUILD:-3}
+VERSION=${VERSION:-0.39.2}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -74,7 +74,8 @@ MAKEARGS+=(PREFIX=/usr)
MAKEARGS+=(LIBNAME=lib${LIBDIRSUFFIX})
MAKEARGS+=(LIBDIR=/usr/lib${LIBDIRSUFFIX})
MAKEARGS+=(LIBEXECDIR=/usr/libexec/rc)
-MAKEARGS+=(SYSCONFDIR=/etc)
+#MAKEARGS+=(SYSCONFDIR=/etc)
+MAKEARGS+=(SYSCONFDIR=/etc/openrc)
MAKEARGS+=(SBINDIR=/sbin)
MAKEARGS+=(MANDIR=/usr/man)
MAKEARGS+=(DOCDIR=/usr/doc/$PRGNAM-$VERSION)
@@ -86,15 +87,13 @@ make "${MAKEARGS[@]}"
make install "${MAKEARGS[@]}" DESTDIR=$PKG
-# Install inittab and logrotate files
-install -m 644 support/sysvinit/inittab "$PKG"/etc/inittab.new
install -Dm 0644 "$CWD/$PRGNAM.logrotate" "$PKG/etc/logrotate.d/${PRGNAM}.new"
# Backup rc.conf
-mv "$PKG/etc/rc.conf" "$PKG/etc/rc.conf.new"
+mv "$PKG/etc/openrc/rc.conf" "$PKG/etc/openrc/rc.conf.new"
# Backup config files
-for file in "$PKG"/etc/conf.d/*; do
+for file in "$PKG"/etc/openrc/conf.d/*; do
mv "${file}" "${file}.new"
done
diff --git a/system/openrc/openrc.info b/system/openrc/openrc.info
index e9ce266c48..080d4426cf 100644
--- a/system/openrc/openrc.info
+++ b/system/openrc/openrc.info
@@ -1,8 +1,8 @@
PRGNAM="openrc"
-VERSION="0.35.5"
+VERSION="0.39.2"
HOMEPAGE="https://github.com/OpenRC/openrc"
-DOWNLOAD="https://github.com/OpenRC/openrc/archive/0.35.5.tar.gz"
-MD5SUM="56c717a04011c5997f361cba040ab923"
+DOWNLOAD="https://github.com/OpenRC/openrc/archive/0.39.2.tar.gz"
+MD5SUM="e5fe74acd25d691c2c48fc94eef68c90"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="%README%"