# HG changeset patch # User Pascal Bellard # Date 1408908102 -7200 # Node ID 633aff33b0523501b58cda982a263f112182377a # Parent 8a8d742e992f4037144fd4721ff31239403f493a ncmpcpp/receipt, remind/receipt, tiptop/receipt, tmux-mem-cpu-load/receipt: update user config file diff -r 8a8d742e992f -r 633aff33b052 ncmpcpp/receipt --- a/ncmpcpp/receipt Sun Aug 24 12:55:58 2014 +0000 +++ b/ncmpcpp/receipt Sun Aug 24 21:21:42 2014 +0200 @@ -39,19 +39,22 @@ post_install() { echo -n "Enabling configuration files..." - mkdir -p $1/home/tux/.ncmpcpp - cp $1/usr/share/doc/ncmpcpp/config /home/tux/.ncmpcpp - cp $1/usr/share/doc/ncmpcpp/keys /home/tux/.ncmpcpp - sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/tux/music"|' /home/tux/.ncmpcpp/config - # Change permissions also - chown -R tux:users /home/tux/.ncmpcpp + for i in $(ls $1/home); do + mkdir -p $1/home/$i/.ncmpcpp + cp $1/etc/skel/.tiptoprc $1/home/$i + cp $1/usr/share/doc/ncmpcpp/config /home/$i/.ncmpcpp + cp $1/usr/share/doc/ncmpcpp/keys /home/$i/.ncmpcpp + sed -i 's|#mpd_music_dir = ""|mpd_music_dir = "/home/'$i'/music"|' /home/$i/.ncmpcpp/config + # Change permissions also + chroot $1/ chown -R $i.users /home/$i/.ncmpcpp + done status } post_remove() { echo -n "Removing configuration files..." - rm -rf /home/tux/.ncmpcpp + rm -rf /home/*/.ncmpcpp status } diff -r 8a8d742e992f -r 633aff33b052 remind/receipt --- a/remind/receipt Sun Aug 24 12:55:58 2014 +0000 +++ b/remind/receipt Sun Aug 24 21:21:42 2014 +0200 @@ -35,11 +35,16 @@ post_install() { # Check for ~/.reminders file - needed for wyrd - if [ ! -f $1/home/tux/.reminders -a -d $1/home/tux ]; then - echo -n "Creating config file..." - touch $1/home/tux/.reminders - chown tux:tux $1/home/tux/.reminders + for i in $(ls $1/home); do + [ -f $1/home/$i/.reminders ] && continue + echo -n "Creating config file for $i ..." + touch $1/home/$i/.reminders + chroot $1/ chown $i.users /home/$i/.reminders status - fi + done } +post_remove() +{ + rm -f $1/home/*/.reminders +} diff -r 8a8d742e992f -r 633aff33b052 tiptop/receipt --- a/tiptop/receipt Sun Aug 24 12:55:58 2014 +0000 +++ b/tiptop/receipt Sun Aug 24 21:21:42 2014 +0200 @@ -23,9 +23,20 @@ # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { - mkdir -p $fs/usr $fs/home/tux # config file + mkdir -p $fs/usr $fs/etc/skel cp -a $install/usr/bin $fs/usr - cp -a $src/tiptoprc $fs/home/tux/.tiptoprc - chown tux.users $fs/home/tux/.tiptoprc + cp -a $src/tiptoprc $fs/etc/skel/.tiptoprc } +post_install() +{ + for i in $(ls $1/home); do + cp $1/etc/skel/.tiptoprc $1/home/$i + chroot $1/ chown $i.users /home/$i/.tiptoprc + done +} + +post_remove() +{ + rm -f $1/home/*/.tiptoprc +} diff -r 8a8d742e992f -r 633aff33b052 tmux-mem-cpu-load/receipt --- a/tmux-mem-cpu-load/receipt Sun Aug 24 12:55:58 2014 +0000 +++ b/tmux-mem-cpu-load/receipt Sun Aug 24 21:21:42 2014 +0200 @@ -31,14 +31,15 @@ post_install() { echo -n "Checking for .tmux.conf..." - if [ ! -f /home/tux/.tmux.conf ] || $(! grep -q "tmux-mem-cpu-load" /home/tux/.tmux.conf); then - cat >> /home/tux/.tmux.conf << EOT + for i in $(ls $1/home); do + grep -qs "tmux-mem-cpu-load" /home/$i/.tmux.conf && continue + cat >> /home/$i/.tmux.conf << EOT # tmux-mem-cpu-load set -g status-interval 2 set -g status-right "#[fg=black,bg=green]#(tmux-mem-cpu-load 2)#[default]" EOT - fi - chown tux:users /home/tux/.tmux.conf + + chroot $1/ chown $i.users /home/$i/.tmux.conf + done status } -