:: [DNG] Configuration wrapup
Inizio della pagina
Delete this message
Reply to this message
Autore: Walter Dnes
Data:  
To: Devuan List
Oggetto: [DNG] Configuration wrapup
I'd like to make one more tweak... turn off general "sudo" permission
and allow *ONLY* stuff that has been hard-coded in include files under
/etc/sudoers.d/ I've already got the include file working. But if I
try something unauthorized, I get the sudo password prompt. I want a
hard fail in that situation.

Walter's Excellent Adventure
============================

There's nothing like switching to another distro to make you feel like
a newbie again.

* When searching for installed QENU I used "apt list | grep -i qenu" and
got an insane list. ""apt list --installed | grep -i qenu" is what I
should've used. I did not have it installed. Once I figured that out,
I installed qemu-system-x86. It works, and I can now waste endless
hours on Galactic Civilizations for OS/2.

* I installed jmtpfs, like on my Gentoo machine, and can now access my
phone to download photos, upload music, etc. When I run a script with
the command

sudo /usr/bin/jmtpfs /home/waltdnes/tablet -o allow_other,auto_unmount

I get the response...

Device 0 (VID=1bbb and PID=f003) is a Alcatel OneTouch 6034R.
Android device detected, assigning default bug flags

I had problems exiting. I hard-code paths in my /etc/sudoers.d/
include file. In Gentoo fusermount is at /usr/bin/fusermount but in
Devuan it's /bin/fusermount. After fixing that, it works fine.

* Backup... arrrgh. My backup script did sanity-checking that /dev/sdb1
was mounted and had 100 gigs of free diskspace. Fail, fail, fail.
Turns that this older machine has an SD-card reader which occupies
/dev/sdb. The USB backup drive shows up as /dev/sdc. After changing
every drive reference, it still failed. Upon checking rsync, I found
that it was not installed... OOPs. I installed rsync and it works.

Notes: python 2.7 is required for building Pale Moon. Python 2.7 is
not on Devuan, so I pulled down the source to /home/user2/python and
built it to /home/user2/py27. No need to archive that. Also avoid
archiving over 5 gigs in each of pmsource and pmsourcetest. That's
"git pull" and build program. But I do want the top level directory
to archive .mozcconfig. And also the .ssh dir. There are TWO unount
commands at the end. The second one spits out an error message,
reassuring me that the drive is indeed unmounted.

Here is my backup script...

#######################################################################

#!/bin/bash
dfdata=$( df /mnt/drive2 | grep "/dev" )
dfarray=($dfdata)

if [ "${dfarray[0]}" != "/dev/sdc1" ]; then
echo "ERROR: /mnt/drive2 is not mounted on /dev/sdc1; aborting backup"
exit
fi

if [ ${dfarray[3]} -lt 100000000 ]; then
echo "ERROR: less than 100G free space on target drive; aborting backup"
exit
fi

[ -e /root/rsync_log.txt ] && rm /root/rsync_log.txt
[ -e  /root/rserrors.txt ] && rm /root/rserrors.txt
cd /
rsync --no-devices --no-specials --keep-dirlinks --links \
      --group --itemize-changes --owner --perms --progress \
      --recursive --stats --times --verbose \
      --filter='- /home/user2/py27' \
      --filter='- /home/user2/python' \
      --filter='- /home/waltdnes/.cache' \
      --filter='- /home/waltdnes/pm/*.xz' \
      --filter='+ /' \
      --filter='+ /home/' \
      --filter='+ /home/user2/' \
      --filter='+ /home/user2/*' \
      --filter='+ /home/user2/pmsource/' \
      --filter='+ /home/user2/pmsource/*' \
      --filter='+ /home/user2/pmsourcetest/' \
      --filter='+ /home/user2/pmsourcetest/*' \
      --filter='+ /home/user2/.ssh/***' \
      --filter='+ /home/waltdnes/***' \
      --filter='+ /root/***' \
      --filter='+ /etc/***' \
      --filter='- *' \
      --log-file=/root/rsync_log.txt / /mnt/drive2/image_dev1/ \
      2>/root/rserrors.txt
sync
umount /mnt/drive2
umount /mnt/drive2


#######################################################################

--
Walter Dnes <waltdnes@???>
There are 2 types of people in this world
1) Those who can extrapolate from incomplete data