#!/bin/sh ## install.sh # # Copyright (C) 2026 by Martin Michalec # # SPDX-License-Identifier: MIT # ## Commentary: # ## Code: if [ "$(id -u)" != 0 ]; then echo "$0: permission denied" exit 1 fi cd "$(dirname "$0")" PREFIX=/usr/local/practice3 set -xeu install -o root -g root -m 755 -d $PREFIX install -o root -g root -m 755 -d $PREFIX/bin install -o root -g root -m 700 -d $PREFIX/etc install -o root -g root -m 700 -d $PREFIX/etc/acl install -o root -g root -m 700 -d $PREFIX/confdata install -o root -g root -m 700 -d $PREFIX/log install -o root -g root -m 6711 passwdctl $PREFIX/bin/passwdctl install -o root -g root -m 6711 shell-dac $PREFIX/bin/shell-dac install -o root -g root -m 6711 shell-mac $PREFIX/bin/shell-mac umask 177 [ ! -f $PREFIX/etc/passwd ] && touch $PREFIX/etc/passwd [ ! -f $PREFIX/log/passwd.log ] && touch $PREFIX/log/passwd.log [ ! -f $PREFIX/log/confdata.log ] && touch $PREFIX/log/confdata.log exit 0 ## install.sh ends here