"Fossies" - the Fresh Open Source Software Archive

Member "install/predoinst.sh" (5 Jun 2020, 1098 Bytes) of package /linux/privat/benno-core-2.8.4.tgz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 # preinst script for benno-archive
    3 #
    4 
    5 set -e
    6 
    7 # summary of how this script can be called:
    8 #        * <new-preinst> `install'
    9 #        * <new-preinst> `install' <old-version>
   10 #        * <new-preinst> `upgrade' <old-version>
   11 #        * <old-preinst> `abort-upgrade' <new-version>
   12 # for details, see http://www.debian.org/doc/debian-policy/ or
   13 # the debian-policy package
   14 
   15 
   16 case "$1" in
   17     install|upgrade)
   18         [ -z "$BENNO_GROUP" ] && BENNO_GROUP=benno
   19         [ -z "$BENNO_USER" ] && BENNO_USER=benno
   20         [ -z "$BENNO_ETC" ] && BENNO_ETC=/etc/benno
   21 
   22         test -d $BENNO_ETC || mkdir $BENNO_ETC
   23 
   24         # 5. adjust file and directory permissions
   25         if ! dpkg-statoverride --list $BENNO_ETC >/dev/null
   26         then
   27             chown -R $BENNO_USER:$BENNO_GROUP $BENNO_ETC
   28             chmod u=rwx,g=rwx,o= $BENNO_ETC
   29         fi
   30     ;;
   31 
   32     abort-upgrade)
   33     ;;
   34 
   35     *)
   36         echo "preinst called with unknown argument \`$1'" >&2
   37         exit 1
   38     ;;
   39 esac
   40 
   41 # dh_installdeb will replace this with shell code automatically
   42 # generated by other debhelper scripts.
   43 
   44 
   45 
   46 exit 0