diff options
Diffstat (limited to '')
-rw-r--r--[-rwxr-xr-x] | source/n/postfix/rc.postfix (renamed from source/k/packaging-x86/kernel-modules/kernel-modules.SlackBuild) | 77 |
1 files changed, 44 insertions, 33 deletions
diff --git a/source/k/packaging-x86/kernel-modules/kernel-modules.SlackBuild b/source/n/postfix/rc.postfix index 400baf1ad..6f583f212 100755..100644 --- a/source/k/packaging-x86/kernel-modules/kernel-modules.SlackBuild +++ b/source/n/postfix/rc.postfix @@ -1,6 +1,6 @@ -#!/bin/sh - -# Copyright 2006, 2008, 2009, 2016 Patrick J. Volkerding, Sebeka, MN, USA +#!/bin/bash +# Copyright 2006, Alan Hicks, Lizella, GA +# Copyright 2017, Patrick J. Volkerding, Sebeka, MN USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -19,39 +19,50 @@ # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +postfix_start() +{ + /usr/sbin/postfix start +} -VERSION=${VERSION:-4.4.14} -KERNELRELEASE=${KERNELRELEASE:-4.4.14} -ARCH=${ARCH:-i586} -BUILD=${BUILD:-1} - -CWD=$(pwd) -TMP=${TMP:-/tmp} -PKG=$TMP/package-kernel-modules - -rm -rf $PKG -mkdir -p $TMP $PKG - -echo "Using /lib/modules/${KERNELRELEASE}/" -echo "Make sure these are *ready*... compressed, or not." -echo "However you want 'em." -sleep 5 -mkdir -p $PKG/lib/modules -cp -a /lib/modules/${KERNELRELEASE} $PKG/lib/modules - -mkdir -p $PKG/install -cat $CWD/slack-desc > $PKG/install/slack-desc +postfix_stop() +{ + /usr/sbin/postfix stop +} -# Write out the doinst.sh: -cat << EOF > $PKG/install/doinst.sh -# A good idea whenever kernel modules are added or changed: -if [ -x sbin/depmod ]; then - chroot . /sbin/depmod -a ${KERNELRELEASE} 1> /dev/null 2> /dev/null -fi +postfix_restart() +{ + postfix_stop + postfix_start +} -EOF +postfix_reload() +{ + /usr/sbin/postfix reload +} -cd $PKG -/sbin/makepkg -l y -c n $TMP/kernel-modules-$(echo ${VERSION} | tr - _)-$ARCH-$BUILD.txz +postfix_status() +{ + /usr/sbin/postfix status +} +case $1 in +'start') + postfix_start + ;; +'stop') + postfix_stop + ;; +'restart') + postfix_restart + ;; +'reload') + postfix_reload + ;; +'status') + postfix_status + ;; +*) + echo "usage $0 start|stop|restart|reload|status" +esac |