dot

packages and services management
Log | Files | Refs | README

commit f1b191b18eaba72b411a3df1b9e70dd94d665007
parent 07b3bb593cfd6ce39689bf63c9ee5bfffa271872
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Sat, 12 Aug 2017 19:30:49 +0200

pkg/bin/pkg-configure: removed automated user management

Diffstat:
Miomenu/bin/io | 2+-
Mpkg/bin/pkg-configure | 27++++-----------------------
2 files changed, 5 insertions(+), 24 deletions(-)

diff --git a/iomenu/bin/io b/iomenu/bin/io @@ -8,7 +8,7 @@ touch "$HOME/.abduco/names" # update sessions list -grep -F -e "$( +[ "$(abduco | wc -l)" = 1 ] && rm "$HOME/.abduco/names" || grep -F -e "$( abduco | awk -F '\t' 'NR > 1 { print $3 " " }' )" "$HOME/.abduco/names" | sort -uk 2,2 -o "$HOME/.abduco/names" diff --git a/pkg/bin/pkg-configure b/pkg/bin/pkg-configure @@ -3,7 +3,7 @@ ETC="${ETC:-$ETC}" PKG="${PKG:-$PKG}" -# --- dotfiles ----------------------------------------------------------------- +# dotfiles find "$PKG/${1:-}" -path "$ROOT/pkg/*/.*" | while IFS='' read -r path do @@ -14,34 +14,15 @@ done find -L "$ROOT" -type l -exec rm {} + 2> /dev/null -# --- crontab ------------------------------------------------------------------ +# crontab [ -f "$PKG/$1/cron" ] && cp "$ROOT/pkg/$1/cron" > "$ETC/cron.d/$1" -# --- user --------------------------------------------------------------------- - -if [ ! -f "$PKG/$1/user" ] -then printf 'no user to add for %s\n' "$1" - -elif [ "$(whoami)" = root ] -then adduser -f "$PKG/$1/user" - -elif command -v doas -then doas adduser -f "$PKG/$1/user" - -elif command -v sudo -then sudo adduser -f "$PKG/$1/user" - -elif command -v su -then su -c 'adduser -f "$1"' "$PKG/$1/user" -fi - - -# --- configure -------------------------------------------------------------------- +# configure if [ ! -f "$PKG/$1/configure" ] -then printf 'no configure needed for %s\n' "$1" +then printf 'no configuration needed for %s\n' "$1" elif [ "$(whoami)" = root ] then sh "$PKG/$1/configure"