diff options
author | Eric Hameleers <alien@slackware.com> | 2020-12-22 10:10:28 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2020-12-22 10:10:28 +0000 |
commit | aa55b723644dbd310b344ead73c389750f456830 (patch) | |
tree | 0a3aecac71df2a0da574ca995203eeca46180af6 /daw_base | |
parent | 66f483167c48e70939db8713a0b262d74243db77 (diff) | |
download | asb-aa55b723644dbd310b344ead73c389750f456830.tar.gz asb-aa55b723644dbd310b344ead73c389750f456830.tar.xz |
daw_base: install an initscript to enable real-time scheduling behaviour if the system does not have PAM
Diffstat (limited to 'daw_base')
-rwxr-xr-x | daw_base/build/daw_base.SlackBuild | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/daw_base/build/daw_base.SlackBuild b/daw_base/build/daw_base.SlackBuild index bee2f21e..10d1137a 100755 --- a/daw_base/build/daw_base.SlackBuild +++ b/daw_base/build/daw_base.SlackBuild @@ -150,9 +150,31 @@ sh $SRCDIR/gen_wallpaper_from_bitmap.sh \ -r $PKG/usr/share/wallpapers chown -R root:root $PKG/usr/share/wallpapers/ +# Install a sample initscript for PAM-less systems: +mkdir -p $PKG/etc +cat << "EOT" > $PKG/etc/initscript.realtime +# Set umask to safe level: +umask 022 +# Disable core dumps: +ulimit -c 0 +# Allow unlimited size to be locked into memory: +ulimit -l unlimited +# Address issue of jackd failing to start with realtime scheduling: +ulimit -r 95 +# Execute the program. +eval exec "$4" +EOT + # Add this to the doinst.sh: mkdir -p $PKG/install cat <<EOINS >> $PKG/install/doinst.sh +# In case PAM is not available, we install an initscript +# to configure real-time scheduling for DAW: +if [ ! -L lib/libpam.so.? ] && [ ! -L lib64/libpam.so.? ] ; then + mv etc/initscript.realtime etc/initscript.new + chmod +x etc/initscript.new +fi + # Handle the incoming configuration files: config() { for infile in \$1; do @@ -184,6 +206,9 @@ preserve_perms() { config etc/security/limits.d/rt_audio.conf.new config etc/sysctl.d/daw.conf.new config etc/udev/rules.d/40-timer-permissions.rules.new +if [ -f etc/initscript.new ]; then + config etc/initscript.new +fi # Update the desktop database: if [ -x usr/bin/update-desktop-database ]; then @@ -206,7 +231,8 @@ EOINS # Add documentation: mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a $SRCDIR/README.1st $PKG/usr/doc/$PRGNAM-$VERSION || true +cp -a $SRCDIR/README.1st $PKG/usr/doc/$PRGNAM-$VERSION/ +cp -a $SRCDIR/gen_wallpaper_from_bitmap.sh $PKG/usr/doc/$PRGNAM-$VERSION/ cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; |