Re: Home made backup system

2019-12-19 Thread Keith Bainbridge

On 19/12/19 4:02 am, rhkra...@gmail.com wrote:

Aside / Admission: I don't backup all that I should and as often as I should,
so I'm looking for ways to improve.  One thought I have is to write my own
backup "system" and use it, and I've thought about that a little,



I understand. For a while I used mc to copy/update files to USB. I had 
to watch to copy - time consuming. Unreliable, because it was manual.


I also realised that I need to be able to go back, and not just to last 
week or last month. The file I change often, I use only a few days a year.


I get that if you create a file and never touch it again, the rotating 
back-ups are useful.   I use timeshift for system partition back-up's 
(and it has saved me several times).



Anyway, I use rsync with back-up option to a backup/year/month/date/hour 
using $NAMEs. The scripts are on the destination to ensure that the 
destinatoin is available.


Each USB  is listed at /etc/fstab to prevent automount on insertion. 
mount options include  noauto,noexecroot's cron mounts the 
destination, remounts it exec then runs the script, which ends with an 
unmount command


2 * * * * mount /mnt/g502 && mount -o remount,exec /mnt/g502/ && cd 
/mnt/g502  && ./daily.sh


extract from daily.sh:


DAY=`date +%Y%b%d`
NOW=`date +%Y%b%d%H`
HOUR=`date +%H`
YEAR=`date +%Y`

cd /mnt/g502

cp /home/keith/rsyncExclusionList.txt ./

date   >>  ./copydailyStarted
echo "g502" >>  ./copydailyStarted

#$DAY >>
#date >> /mnt/g502/copydailyStarted
#$NOW >>  /mnt//g502/copydailyStarted

mkdir ./rsynccBackupp/$DAY/$HOUR

rsync -rubvLH --backup-dir=./rsynccBackupp/$DAY/$HOUR  --exclude 
'**ache' --exclude '.thunderb**' --exclude '**mozilla**' --exclude 
'**mzzlla**' --exclude '**eamonkey**' --exclude '**hromium** ' 
/mnt/data/keith/ ./



The --exclude bits aren't working, yet; and neither did an 
--exclude-from-list bit.



Anyhow, just my 2 bobs worth.




--
Keith Bainbridge

kkeith.bainbridge.3...@gmail.com
+61 (0)447 667 468



Just before -Paperworld 2020

2019-12-19 Thread Mary Smith
Hello,

Wonderful day to you!

Just wanted to check if you would be interested in acquire Paperworld 2020
(The International Trade Fair for Stationery, Office Supplies and Writing
Instruments) attendee companies to increase prospect flow at your booth -
Product launch- Brand awareness - increase Sales - Annual marketing Etc.

Venue:   Frankfurt, Germany
Information Provided: - Company name, URL, Contact name, Job title, Business
contact, fax number, physical address, Industry, Company size, Email
address.

We also provide customized lists for all your multi-channel mode planning. 

Please advise, so I can provide you available counts and cost information
for your approval.

Look forward to your reply.

Best Regards,
Mary Smith 
B2B Tradeshow Specialist

Note: Christmas holiday sprinkles prices start for now onwards to avail
discount 25% on actual cost for all our clients!

If you do not wish to receive the attendees list, please reply as 'Opt-out'.



Re: Home made backup system

2019-12-19 Thread David Christensen

On 2019-12-19 21:04, David Christensen wrote:

So, ~47 snapshots of ~892 GB of data.  That is ~51 TB.


Correction -- 42 TB.


David



Re: Home made backup system

2019-12-19 Thread David Christensen

On 2019-12-19 09:45, ghe wrote:


How about writing a little script for rsync saying how you want it to
backup, what to backup, and what not to backup and set cron jobs for
when you want it to run. In the cron jobs, tell it to write to different
directories, so to keep several days or backups.


The fundamental problem is duplication.


Here is the data on my SOHO server:

2019-12-19 20:33:28 toor@soho2 ~
# du -sg /jail/cvs/var/local/cvs /jail/samba/var/local/samba
1   /jail/cvs/var/local/cvs
891 /jail/samba/var/local/samba


So, ~892 GB of live data.


Here are the snapshots (backups):

2019-12-19 20:46:37 toor@soho2 ~
# ls -1 /jail/cvs/var/local/cvs/.zfs/snapshot 
/jail/samba/var/local/samba/.zfs/snapshot

/jail/cvs/var/local/cvs/.zfs/snapshot:
manual-20190530-1804
manual-20190530-1830
manual-20191209-1728
manual-20191209-1741
manual-20191209-1802
zfs-auto-snap_d-2019-12-07-00h07
zfs-auto-snap_d-2019-12-08-00h07
zfs-auto-snap_d-2019-12-14-00h07
zfs-auto-snap_d-2019-12-15-00h07
zfs-auto-snap_d-2019-12-16-00h07
zfs-auto-snap_d-2019-12-17-00h07
zfs-auto-snap_d-2019-12-18-00h07
zfs-auto-snap_d-2019-12-19-00h07
zfs-auto-snap_f-2019-09-05-20h12
zfs-auto-snap_f-2019-09-07-00h00
zfs-auto-snap_f-2019-09-15-23h00
zfs-auto-snap_f-2019-09-19-22h48
zfs-auto-snap_f-2019-10-05-23h12
zfs-auto-snap_f-2019-10-07-20h00
zfs-auto-snap_f-2019-10-15-20h00
zfs-auto-snap_f-2019-11-03-14h36
zfs-auto-snap_f-2019-11-14-19h36
zfs-auto-snap_f-2019-11-15-21h12
zfs-auto-snap_f-2019-11-25-19h48
zfs-auto-snap_f-2019-11-29-17h00
zfs-auto-snap_f-2019-12-19-20h36
zfs-auto-snap_h-2019-12-18-20h02
zfs-auto-snap_h-2019-12-18-21h02
zfs-auto-snap_h-2019-12-18-22h02
zfs-auto-snap_h-2019-12-18-23h02
zfs-auto-snap_h-2019-12-19-00h02
zfs-auto-snap_h-2019-12-19-01h02
zfs-auto-snap_h-2019-12-19-02h02
zfs-auto-snap_h-2019-12-19-03h02
zfs-auto-snap_h-2019-12-19-04h02
zfs-auto-snap_h-2019-12-19-05h02
zfs-auto-snap_h-2019-12-19-06h02
zfs-auto-snap_h-2019-12-19-07h02
zfs-auto-snap_h-2019-12-19-08h02
zfs-auto-snap_h-2019-12-19-09h02
zfs-auto-snap_h-2019-12-19-10h02
zfs-auto-snap_h-2019-12-19-11h02
zfs-auto-snap_h-2019-12-19-12h02
zfs-auto-snap_h-2019-12-19-13h02
zfs-auto-snap_h-2019-12-19-14h02
zfs-auto-snap_h-2019-12-19-15h02
zfs-auto-snap_h-2019-12-19-16h02
zfs-auto-snap_h-2019-12-19-17h02
zfs-auto-snap_h-2019-12-19-18h02
zfs-auto-snap_h-2019-12-19-19h02
zfs-auto-snap_h-2019-12-19-20h02
zfs-auto-snap_m-2019-09-01-00h17
zfs-auto-snap_m-2019-10-01-00h17
zfs-auto-snap_m-2019-11-01-00h17
zfs-auto-snap_m-2019-12-01-00h17
zfs-auto-snap_w-2019-11-17-00h12
zfs-auto-snap_w-2019-11-24-00h12
zfs-auto-snap_w-2019-12-01-00h12
zfs-auto-snap_w-2019-12-08-00h12
zfs-auto-snap_w-2019-12-15-00h12

/jail/samba/var/local/samba/.zfs/snapshot:
manual-20190530-1804
manual-20190530-1830
manual-20191210-1736
zfs-auto-snap_d-2019-12-09-00h07
zfs-auto-snap_d-2019-12-10-00h07
zfs-auto-snap_d-2019-12-14-00h07
zfs-auto-snap_d-2019-12-15-00h07
zfs-auto-snap_d-2019-12-16-00h07
zfs-auto-snap_d-2019-12-17-00h07
zfs-auto-snap_d-2019-12-18-00h07
zfs-auto-snap_d-2019-12-19-00h07
zfs-auto-snap_f-2019-12-08-11h36
zfs-auto-snap_f-2019-12-19-20h36
zfs-auto-snap_h-2019-12-18-20h02
zfs-auto-snap_h-2019-12-18-21h02
zfs-auto-snap_h-2019-12-18-22h02
zfs-auto-snap_h-2019-12-18-23h02
zfs-auto-snap_h-2019-12-19-00h02
zfs-auto-snap_h-2019-12-19-01h02
zfs-auto-snap_h-2019-12-19-02h02
zfs-auto-snap_h-2019-12-19-03h02
zfs-auto-snap_h-2019-12-19-04h02
zfs-auto-snap_h-2019-12-19-05h02
zfs-auto-snap_h-2019-12-19-06h02
zfs-auto-snap_h-2019-12-19-07h02
zfs-auto-snap_h-2019-12-19-08h02
zfs-auto-snap_h-2019-12-19-09h02
zfs-auto-snap_h-2019-12-19-10h02
zfs-auto-snap_h-2019-12-19-11h02
zfs-auto-snap_h-2019-12-19-12h02
zfs-auto-snap_h-2019-12-19-13h02
zfs-auto-snap_h-2019-12-19-14h02
zfs-auto-snap_h-2019-12-19-15h02
zfs-auto-snap_h-2019-12-19-16h02
zfs-auto-snap_h-2019-12-19-17h02
zfs-auto-snap_h-2019-12-19-18h02
zfs-auto-snap_h-2019-12-19-19h02
zfs-auto-snap_h-2019-12-19-20h02
zfs-auto-snap_m-2019-09-01-00h17
zfs-auto-snap_m-2019-10-01-00h17
zfs-auto-snap_m-2019-11-01-00h17
zfs-auto-snap_m-2019-12-01-00h17
zfs-auto-snap_w-2019-11-17-00h12
zfs-auto-snap_w-2019-11-24-00h12
zfs-auto-snap_w-2019-12-01-00h12
zfs-auto-snap_w-2019-12-08-00h12
zfs-auto-snap_w-2019-12-15-00h12


So, ~47 snapshots of ~892 GB of data.  That is ~51 TB.  My backup disks 
are 2.9 TB.



ZFS with de-duplication and compression consumes 1.16 TB for the live 
filesystem plus all snapshots:


2019-12-19 20:39:53 toor@soho2 ~
# zpool list p2
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAGCAP  DEDUP 
HEALTH  ALTROOT

p24.06T  1.16T  2.90T- - 3%28%  1.13x  ONLINE  -


Multiple rsync destination directories are not an option for me.


David



Re: Firefox equivalent of SeaMonkey's pref.js

2019-12-19 Thread Ben Caradoc-Davies

On 20/12/2019 10:52, Richard Owlett wrote:

As I date from Netscape era I much prefer SeaMonkey.
However when I did a reasonably default install of Debian 9.8 I got
Firefox 60.5.0esr .
Due to *OPERATOR ERROR*, I mangled a preference.
On the mozilla.general list I was told to edit pref.js .
For SeaMonkey I have no problem.
For Firefox where/what is equivalent file/directory? ?? ???  ??
TIA


prefs.js (with an "s"):

~/.mozilla/firefox/$PROFILE/prefs.js

where $PROFILE is the generated profile directory. If you have multiple 
profiles, you can find all instances of prefs.js with:


find ~/.mozilla/firefox -name prefs.js

Kind regards,

--
Ben Caradoc-Davies 
Director
Transient Software Limited 
New Zealand



Firefox equivalent of SeaMonkey's pref.js

2019-12-19 Thread Richard Owlett

As I date from Netscape era I much prefer SeaMonkey.
However when I did a reasonably default install of Debian 9.8 I got
Firefox 60.5.0esr .

Due to *OPERATOR ERROR*, I mangled a preference.
On the mozilla.general list I was told to edit pref.js .

For SeaMonkey I have no problem.

For Firefox where/what is equivalent file/directory? ?? ???  ??
TIA




Re: Home made backup system

2019-12-19 Thread Nate Bargmann
I also use rsnapshot on this machine to backup to another drive in the
same case.  I'd thought about off site, perhaps AWS or such but haven't
spent enough time trying to figure out how I might do that with
rsnapshot.

- Nate

-- 

"The optimist proclaims that we live in the best of all
possible worlds.  The pessimist fears this is true."

Web: https://www.n0nb.us
Projects: https://github.com/N0NB
GPG fingerprint: 82D6 4F6B 0E67 CD41 F689 BBA6 FB2C 5130 D55A 8819



signature.asc
Description: PGP signature


Re: dpkg returned an error code 1

2019-12-19 Thread Marco Shaw
I might have fixed this by simply running:
dpkg --configure -a

My highest priority was to be able to install mycustompackage.deb.  I'm a
bit less concerned if I'm slightly behind on qmail versions (or a few other
packages).

On Thu, Dec 19, 2019 at 2:54 PM Marco Shaw  wrote:

> (I'm not sure if I'm on the right track and whether the information below
> is everything.  I'm still researching and trying to figure out what to do.
> There's no backup available.  I'm looking for any possible
> hints/logs/commands/etc.)
>
> Debian Wheezy 7.x 32-bit (I know I should upgrade, but bear with me)
>
> I'm in a bit of a pickle. I tried to upgrade a chroot'ed environment and
> it seems I broke dpkg in the process.
>
> I don't know if the cause of the problems is that apt-get isn't able to
> handle a qmail upgrade or if it's something else (it seems snmpd also
> didn't "finish" during the last round).
>
> I think the error I'm trying to address is:
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> I might have some of the information from the console when this first
> broke, but it seems I can reproduce as per below.
>
> It seems I have a very old version of qmail, and upgrading to the one in
> my apt mirror is too much of a change. I've googled, and have not been able
> to find anything between 1.03-38 and 1.06-5 yet.
>
> (Removed a few lines and struggled with the formatting)
> # apt-get install qmail
> The following extra packages will be installed:
>   qmail-run qmail-uids-gids
> Suggested packages:
>   dot-forward qmail-tools
> The following NEW packages will be installed:
>   qmail-run qmail-uids-gids
> The following packages will be upgraded:
>   qmail
> 1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
> 107 not fully installed or removed.
> Do you want to continue [Y/n]?
> Get:1 http://10.105.176.67/debian/ wheezy/main snmpd i386
> 5.4.3~dfsg-2.8+deb7u1 [964 kB]
> Fetched 964 kB in 0s (6,685 kB/s)
> Can not write log, openpty() failed (/dev/pts not mounted?)
> (Reading database ... 1852018 files and directories currently installed.)
> Preparing to replace qmail 1.03-38 (using
> .../archives/qmail_1.06-5_i386.deb) ...
> Upgrading from qmail version 1.03-38 is not yet supported.
> dpkg: error processing /var/cache/apt/archives/qmail_1.06-5_i386.deb
> (--unpack):
>  subprocess new pre-installation script returned error exit status 1
> rmdir: failed to remove `/var/lib/qmail': Directory not empty
> insserv: warning: script 'K01qmail' missing LSB tags and overrides
> insserv: warning: script 'qmail' missing LSB tags and overrides
> dpkg: regarding .../qmail-uids-gids_1.06-5_all.deb containing
> qmail-uids-gids:
>  qmail conflicts with qmail-uids-gids
>   qmail-uids-gids (version 1.06-5) is to be installed.
> dpkg: error processing
> /var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb (--unpack):
>  conflicting packages - not installing qmail-uids-gids
> dpkg: regarding .../qmail-run_2.0.2_all.deb containing qmail-run:
>  qmail-run conflicts with mail-transport-agent
>   qmail provides mail-transport-agent and is present and installed.
>


Re: Home made backup system

2019-12-19 Thread Charles Curley
On Thu, 19 Dec 2019 10:45:22 -0700
ghe  wrote:

> How about writing a little script for rsync saying how you want it to
> backup, what to backup, and what not to backup and set cron jobs for
> when you want it to run. In the cron jobs, tell it to write to
> different directories, so to keep several days or backups.

Or look into rsnapshot, which does all this and more.

-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: dpkg returned an error code 1

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 03:30:37PM -0400, Marco Shaw wrote:
> (I'm not sure how well Gmail will format things.)

Seems OK, mostly.

> Also in my chroot:

Ah.  You likely forgot to bind-mount the various little things that
one has to bind-mount inside a chroot to get full functionality.  This
is probably not immediately relevant to your problem.  Probably.

> # dpkg -i /tmp/mycustompackage_i386.deb
> Selecting previously unselected package mycustompackage.

One has to wonder whether this package is even properly built.

> dpkg: dependency problems prevent configuration of mycustompackage:
> mycustompackage depends on libmysqlclient18 (>= 5.5.43-0+deb7u1); however:
>   Package libmysqlclient18:i386 is not configured yet.
> mycustompackage depends on libk5crypto3 (>= 1.10.1+dfsg-5+deb7u3); however:
>   Package libk5crypto3:i386 is not configured yet.
> mycustompackage depends on perl-modules (>= 5.14.2-21+deb7u2); however:
>   Package perl-modules is not configured yet.
> mycustompackage depends on libxml2 (>= 2.8.0+dfsg1-7+wheezy4); however:
>   Package libxml2:i386 is not configured yet.
> mycustompackage depends on libkrb5support0 (>= 1.10.1+dfsg-5+deb7u3);
> however:
>   Package libkrb5support0:i386 is not configured yet.
> mycustompackage depends on libcurl3 (>= 7.26.0-1+wheezy17); however:
>   Package libcurl3:i386 is not configured yet.
> mycustompackage depends on libssl1.0.0 (>= 1.0.1t-1+deb7u1); however:
>   Package libssl1.0.0:i386 is not configured yet.
> mycustompackage depends on libxml-libxml-perl (>= 2.0001+dfsg-1+deb7u1);
> however:
>   Package libxml-l

The errors cut off here, perhaps due to a cut and paste failure, or
perhaps due to something else.  I suspect the important bits are in
this missing segment.  There's some long chain of A depends on B
depends on C depends on D... and we need to see the end of this chain.



Re: dpkg returned an error code 1

2019-12-19 Thread Marco Shaw
(I'm not sure how well Gmail will format things.)

I'm adding one more piece of information and I've also answered/commented
much further below.

I tried to install a customer .deb file and it threw these types of errors
as copied below.  I don't know if this adds/clarifies anything.

I'm 99% certain this is the chain of events to where I'm at:
1. I changes the sources.list to point to an Internet site (my local Wheezy
repo was badly broken - long story)
2. Installed a whole bunch of updates (including the ones showing "not
configured" above, and the qmail and snmpd that are showing errors.  Ended
up with a "dpkg error 1".
3. Tried to install mycustompackage and see the above error.
4. Tried a apt-get install/dist-upgrade to see if it helps any to help me
figure out the problem.

Also in my chroot:
# dpkg -i /tmp/mycustompackage_i386.deb
Selecting previously unselected package mycustompackage.
(Reading database ... 1834636 files and directories currently installed.)
Unpacking mycustompackage (from .../mycustompackage_i386.deb) ...
dpkg: dependency problems prevent configuration of mycustompackage:
mycustompackage depends on libmysqlclient18 (>= 5.5.43-0+deb7u1); however:
  Package libmysqlclient18:i386 is not configured yet.
mycustompackage depends on libk5crypto3 (>= 1.10.1+dfsg-5+deb7u3); however:
  Package libk5crypto3:i386 is not configured yet.
mycustompackage depends on perl-modules (>= 5.14.2-21+deb7u2); however:
  Package perl-modules is not configured yet.
mycustompackage depends on libxml2 (>= 2.8.0+dfsg1-7+wheezy4); however:
  Package libxml2:i386 is not configured yet.
mycustompackage depends on libkrb5support0 (>= 1.10.1+dfsg-5+deb7u3);
however:
  Package libkrb5support0:i386 is not configured yet.
mycustompackage depends on libcurl3 (>= 7.26.0-1+wheezy17); however:
  Package libcurl3:i386 is not configured yet.
mycustompackage depends on libssl1.0.0 (>= 1.0.1t-1+deb7u1); however:
  Package libssl1.0.0:i386 is not configured yet.
mycustompackage depends on libxml-libxml-perl (>= 2.0001+dfsg-1+deb7u1);
however:
  Package libxml-l
dpkg: error processing mycustompackage (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mycustompackage

On Thu, Dec 19, 2019 at 3:02 PM Greg Wooledge  wrote:

> On Thu, Dec 19, 2019 at 02:54:18PM -0400, Marco Shaw wrote:
> > # apt-get install qmail
> [...]
> > Can not write log, openpty() failed (/dev/pts not mounted?)
>
> Not reassuring.  Is this a real computer?  Or even a real virtual
> machine?  If it's some kind of container, well... good luck with that.
>
>
Yes, I think this is related to the chroot.  I checked a training video
from 2017 and this comes up often.


> > Upgrading from qmail version 1.03-38 is not yet supported.
> > rmdir: failed to remove `/var/lib/qmail': Directory not empty
>
> Sounds like you will need to clean up some stuff by hand.
>
>
I will work on that.


Re: dpkg returned an error code 1

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 02:54:18PM -0400, Marco Shaw wrote:
> # apt-get install qmail
[...]
> Can not write log, openpty() failed (/dev/pts not mounted?)

Not reassuring.  Is this a real computer?  Or even a real virtual
machine?  If it's some kind of container, well... good luck with that.

> Upgrading from qmail version 1.03-38 is not yet supported.
> rmdir: failed to remove `/var/lib/qmail': Directory not empty

Sounds like you will need to clean up some stuff by hand.

I recommend that you make a backup of *everything*.  Then make a separate
backup of just the qmail configuration.  Then purge your existing
qmail* packages (use --force-depends to prevent it from screaming).
Then nuke the directories that it wants you to nuke, like the one shown
above.

Then install the new qmail* packages, and merge your old configuration
into the new configuration, manually.



Re: pdffiller

2019-12-19 Thread Galvatorix Torixgalva
Hola,

podrias comenzar con un LAMP y ver que se puede hacer con php, con python,
con perl, etc.

A ver si por ahi encuentras algo de lo que buscas.

Un saludo


dpkg returned an error code 1

2019-12-19 Thread Marco Shaw
(I'm not sure if I'm on the right track and whether the information below
is everything.  I'm still researching and trying to figure out what to do.
There's no backup available.  I'm looking for any possible
hints/logs/commands/etc.)

Debian Wheezy 7.x 32-bit (I know I should upgrade, but bear with me)

I'm in a bit of a pickle. I tried to upgrade a chroot'ed environment and it
seems I broke dpkg in the process.

I don't know if the cause of the problems is that apt-get isn't able to
handle a qmail upgrade or if it's something else (it seems snmpd also
didn't "finish" during the last round).

I think the error I'm trying to address is:
E: Sub-process /usr/bin/dpkg returned an error code (1)

I might have some of the information from the console when this first
broke, but it seems I can reproduce as per below.

It seems I have a very old version of qmail, and upgrading to the one in my
apt mirror is too much of a change. I've googled, and have not been able to
find anything between 1.03-38 and 1.06-5 yet.

(Removed a few lines and struggled with the formatting)
# apt-get install qmail
The following extra packages will be installed:
  qmail-run qmail-uids-gids
Suggested packages:
  dot-forward qmail-tools
The following NEW packages will be installed:
  qmail-run qmail-uids-gids
The following packages will be upgraded:
  qmail
1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
107 not fully installed or removed.
Do you want to continue [Y/n]?
Get:1 http://10.105.176.67/debian/ wheezy/main snmpd i386
5.4.3~dfsg-2.8+deb7u1 [964 kB]
Fetched 964 kB in 0s (6,685 kB/s)
Can not write log, openpty() failed (/dev/pts not mounted?)
(Reading database ... 1852018 files and directories currently installed.)
Preparing to replace qmail 1.03-38 (using
.../archives/qmail_1.06-5_i386.deb) ...
Upgrading from qmail version 1.03-38 is not yet supported.
dpkg: error processing /var/cache/apt/archives/qmail_1.06-5_i386.deb
(--unpack):
 subprocess new pre-installation script returned error exit status 1
rmdir: failed to remove `/var/lib/qmail': Directory not empty
insserv: warning: script 'K01qmail' missing LSB tags and overrides
insserv: warning: script 'qmail' missing LSB tags and overrides
dpkg: regarding .../qmail-uids-gids_1.06-5_all.deb containing
qmail-uids-gids:
 qmail conflicts with qmail-uids-gids
  qmail-uids-gids (version 1.06-5) is to be installed.
dpkg: error processing
/var/cache/apt/archives/qmail-uids-gids_1.06-5_all.deb (--unpack):
 conflicting packages - not installing qmail-uids-gids
dpkg: regarding .../qmail-run_2.0.2_all.deb containing qmail-run:
 qmail-run conflicts with mail-transport-agent
  qmail provides mail-transport-agent and is present and installed.


Re: Broken PMTUD / ICMP blackhole?

2019-12-19 Thread Celejar
On Thu, 19 Dec 2019 12:35:06 -0600
John Hasler  wrote:

> Celejar writes:
> >  ...the problem only occurs when tethering.
> 
> I wrote:
> > Which is the only time the cellular encapsulation is being done.
> 
> Celejar writes:
> > Understood. I had been responding to your point about the wifi
> > encapsulation.
> 
> You've eliminated that by demonstrating that the problem only occurs
> when cellular is involved.
> 
> >>From here the requirements of cellular encapsulation look a lot like the
> requirements for DSL encapsulation and so the solutions may be similar.
> Worst case, they may even be the same.

Thanks. I don't know anything about DSL encapsulation, and it sounds
like I don't really want to ;)

Celejar



Re: Home made backup system

2019-12-19 Thread Celejar
On Wed, 18 Dec 2019 12:02:56 -0500
rhkra...@gmail.com wrote:

> Aside / Admission: I don't backup all that I should and as often as I should, 
> so I'm looking for ways to improve.  One thought I have is to write my own 
> backup "system" and use it, and I've thought about that a little, and provide 
> some of my thoughts below.
> 
> A purpose of sending this to the mailing-list is to find out if there already 
> exists a solution (or parts of a solution) close to what I'm thinking about 
> (no sense re-inventing the wheel), or if someone thinks I've overlooked 
> something or making a big mistake.

There are certainly tools that do at least most of what you want. For
example, I use rsnapshot, basically a front-end to rsync that is
designed to harness rsync's power to streamline the taking of
incremental backups.

...

>* the backups should be in formats such that I can access them by a 
> variety 
> of other tools (as appropriate) if I need to -- if I backup an entire 
> directory or partition, I should be able to easily access and restore any 
> particular file from within that backup, and do so even if encrypted (i.e., 
> encryption would be done by "standard programs" (a bad example might be 
> ccrypt) that I could use "outside" of the backup system.

rsnapshot uses rsync + hardlinks to recreate the portions of
the filesystem that you want to back up (source) to wherever you tell it
to (target). That recreated filesystem can be accessed in any way that
the original filesystem can - no special tools are required for access
or recovery.

>* the bash subroutine (command) that I write should basically do the 
> following:
> 
>   * check that the specified target exists (for things like removable 
> drives or NAS type things) and has (sufficient) space (not sure I can tell 
> that 

rsnapshot does have a check for target availability. I don't think it
can check for sufficient space before initiating a backup - as you note,
it's a tricky thing to do - but it does have a 'du' option to report on
the target's current level of usage.

> until after backup is attempted) (or an encrypted drive that is not mounted / 
> unencrypted, i.e., available to write to)

>   * if the right conditions don't exist (above) tell me (I'm thinking of 
> an email as email is something that always gets my attention, maybe not 
> immediately, but soon enough)

rsnapshot will fail with an error code if something is wrong - assuming
you run it from cron, cron will email the error message.

>   * if the right conditions do exist, invoke the commands to backup the 
> files
> 
>   * if the backup is unsuccessful for any reason, notify me (email again)

As above.

>   * optionally notify me that the backup was successful (at least to the 
> extent of writing something)

By default rsnapshot prints nothing to stdout upon success (although
it does have a 'verbose' option), but it does log a 'success' message to
syslog, which I suppose you can keep an eye on with a log analyzer
(something like logwatch). Alteratively, I just reconfigured my
rsnapshot deployment to run rsnapshot with this wrapper, which results
in a notification for success but not for failure (since rsnapshot
pulls backups from the source, and in my case, the laptop it's
backing up is often not present, I would normally be flooded with
unnecessary failure notices):

*

#!/bin/sh

# usage 'rsnapshot-script x', where 'x' is a backup interval defined in the
# rsnapshot configuration file

if nc -z lila 22 2>/dev/null
then
echo "Running 'rsnapshot $1' ..."
if rsnapshot $1
then echo Success
fi
fi

*

>   * optionally actually do something to confirm that the backup is 
> readable 
> / usable (need to think about what that could be -- maybe write it (to /tmp 
> or 
> to a ramdrive), do something like a checksum (e.g., sha-256 or whatever makes 
> sense) on it and the original file, and confirm they match

rsnapshot has a hook system that allows you to add commands to be run
by it.

>   * ???
> 
> All of the commands invoked by the script should be parameters so that the 
> commands can be easily changed in the future (e.g., cp / tar / rsync, sha-256 
> or whatever, ccrypt or whatever, etc.) 

rsnapshot has configuration options 'cmd_cp', 'cmd_rm', 'cmd_rsync',
'cmd_ssh', 'cmd_logger', 'cmd_du' to do exactly that.

> Then the master script (actually probably scripts, e.g. one or more each for 
> hourly, daily, weekly, ... backups) would be invoked by cron (or maybe 
> include 
> the at command? --my computers run 24/7 unless they crash, but for others, at 
> or something similar might be a better choice) would invoke that subroutine / 
> command for each file, directory, or partition to be backed up, specifying 
> the 
> commands to use, what files to backup, where to back them up, encrypted or 
> not, 
> compressed or not, tarred or not, etc.

rsnapshot does all this, via coordination with its 

Re: Broken PMTUD / ICMP blackhole?

2019-12-19 Thread John Hasler
Celejar writes:
>  ...the problem only occurs when tethering.

I wrote:
> Which is the only time the cellular encapsulation is being done.

Celejar writes:
> Understood. I had been responding to your point about the wifi
> encapsulation.

You've eliminated that by demonstrating that the problem only occurs
when cellular is involved.

>From here the requirements of cellular encapsulation look a lot like the
requirements for DSL encapsulation and so the solutions may be similar.
Worst case, they may even be the same.
-- 
John Hasler 
jhas...@newsguy.com
Elmwood, WI USA



Re: Home made backup system

2019-12-19 Thread ghe


How about writing a little script for rsync saying how you want it to
backup, what to backup, and what not to backup and set cron jobs for
when you want it to run. In the cron jobs, tell it to write to different
directories, so to keep several days or backups.

Not as smart as amanda (it'll backup more than necessary), but I think
it'll do the job with a whole lot less configuration.

I use something like this to backup a domain a thousand miles away.

-- 
Glenn English



Re: help with installation?

2019-12-19 Thread Steve McIntyre
[ Other people have answered your other questions... ]

Kaye wrote:
> 1.2  I see above different names of desktop environment, but what is
>'standard'?
> (second to the last on the list)

"standard" is a simple cut-down text-only system, basically just
including the core packages that are marked as "standard" in the
Debian archive. It's a small system that you might use for a server or
in a VM where you don't want all the extra packages that the GUI
desktops use.

-- 
Steve McIntyre, Cambridge, UK.st...@einval.com
  Armed with "Valor": "Centurion" represents quality of Discipline,
  Honor, Integrity and Loyalty. Now you don't have to be a Caesar to
  concord the digital world while feeling safe and proud.



Re: Debian on raspberrypi: failed to configure wlan0

2019-12-19 Thread Franco Martelli
On 19/12/19 at 08:39, Bonno Bloksma wrote:
> Hello Franco,
> 
> So just to be sure we understand you correctly, and anyone else who thinks 
> this is the solution...
> 
> []
>> Thanks for your answer I've just solved thank reading this link [1] it was 
>> the gateway line once commented all work fine. Now the wlan0 configuration 
>> file is:
>>
>>
>>
>> ~# cat /etc/network/interfaces.d/wlan0
>> # allow-hotplug wlan0
>> iface wlan0 inet static
>> address 192.168.0.9
>> netmask 255.255.255.0
>> network 192.168.0.0
>> broadcast 192.168.0.255
>> # gateway 192.168.0.1
>> wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
>>
>> Debian on raspberrypi works great I've cups, bind9, isc-dhcp-server running 
>> fine, if you are unsure give it a try.
>>
>>
>> [1]
>> https://raspberrypi.stackexchange.com/questions/13895/solving-rtnetlink-answers-file-exists-when-running-ifup
> 
> The discussion behind this links talks about the fact that a system can have 
> only one default gateway, there can be only one gateway statement in the 
> interfaces file(s).
> As you show us the config for one file in the interfaces.d/ directory, can we 
> assume you have another interface that is up and running for which there is a 
> separate file in interfaces.d/ ?
> That file might then not even have a gateway statement if it used dhcp.
> 
> Bonno Bloksma
> 
Hello Bonno,

I apologize if I didn't post my entire network configuration in
/etc/network/interfaces.d/ there is also a file called eth0 besides wlan0:

~# cat /etc/network/interfaces.d/eth0
auto eth0

iface eth0 inet static
   address 192.168.0.7
   netmask 255.255.255.0
   network 192.168.0.0
   broadcast 192.168.0.255
   gateway 192.168.0.1

The ifup command parse the eth0 file when it attempt to bring up wlan0
as you can see if is set in verbose mode:

~# ifup -vvv wlan0
ifup: reading directory /etc/network/interfaces.d
ifup: parsing file /etc/network/interfaces.d/eth0
ifup: parsing file /etc/network/interfaces.d/wlan0

ifup: configuring interface wlan0=wlan0 (inet)
/usr/sbin/ip addr flush dev wlan0
/bin/run-parts --exit-on-error --verbose /etc/network/if-pre-up.d
run-parts: executing /etc/network/if-pre-up.d/wireless-tools
run-parts: executing /etc/network/if-pre-up.d/wpasupplicant
wpa_supplicant: wpa-driver nl80211,wext (default)
wpa_supplicant: /sbin/wpa_supplicant -s -B -P
/run/wpa_supplicant.wlan0.pid -i wlan0 -D nl80211,wext -c
/etc/wpa_supplicant/wpa_supplicant.conf
Starting /sbin/wpa_supplicant...
wpa_supplicant: creating sendsigs omission pidfile:
/run/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid
wpa_supplicant: ctrl_interface socket located at
/var/run/wpa_supplicant/wlan0
/sbin/ip addr add 192.168.0.9/255.255.255.0 broadcast 192.168.0.255
  dev wlan0 label wlan0
/sbin/ip link set dev wlan0   up

/bin/run-parts --exit-on-error --verbose /etc/network/if-up.d
run-parts: executing /etc/network/if-up.d/avahi-daemon
run-parts: executing /etc/network/if-up.d/bind9
run-parts: executing /etc/network/if-up.d/mountnfs
run-parts: executing /etc/network/if-up.d/wpasupplicant

When ifup parse eth0 file find the gateway statement and when parse
wlan0 it found again a gateway statement for the same address therefore
it fails to bring up the interface.
So the solution is to comment/remove the gateway statement in wlan0, for
this LAN configuration (I thought).

Best regards
-- 
Franco Martelli



Re: Home made backup system

2019-12-19 Thread songbird
Greg Wooledge wrote:
...
> History expansion is a bloody nightmare.  I recommend simply turning
> it off and living without it.  Of course, that's a personal preference,
> and you're free to continue banging your head against it, if you feel
> that the times it helps you outweigh the times that it hurts you.

  i only use a few commands regularly and have them either
aliased or stuck in history for me in my .bashrc
(i start every session by history -c to get rid of
anything and then use history -s "command" so pretty
much my routine when signing on in the morning is to
do !1 and then !2, !3 if i need to do a dist-upgrade.

!1 is apt-get update & fetchnews
!2 is apt-get upgrade
!3 is apt-get dist-upgrade


...
> ... and then, to add insult to injury, the command with the failed history
> expansion isn't even recorded in the shell's history, so you can't just
> "go up" and edit the line.  You have to start all over from scratch, or
> copy and paste the command with the mouse like some kind of Windows user.

  ha, yeah...

  i rarely use shell recording or other tools like
that but once in a while i've been rescued by my
habit of cat'ing the contents of a file to the terminal
to look at it instead of using an editor (and having
an infinite scroll window).


  songbird



Re: help with installation?

2019-12-19 Thread Richard Owlett

On 12/19/2019 09:51 AM, Kenneth Parker wrote:



On Thu, Dec 19, 2019, 9:19 AM Greg Wooledge > wrote:


On Thu, Dec 19, 2019 at 12:47:56PM +, Joe wrote:
 > > 1.  I want to install via Live USB.

Why?  The Live images are not meant to be installed.  They're meant
to be run from removable media.


That was never my understanding.  If you are, as I used to be, "Internet 
Challenged", go somewhere, where you can "borrow Internet", get the full 
DVD, make sure that it works, and then install it from the DVD.


Then, go to the Coffee House and upgrade it.   (Yes:  "good old days").

Also, if the Live Images are not meant to be installed, why supply a 
Good, Working Install routine?


Kenneth Parker



I've been casually following this thread.
I'm wondering if the OP's definition of "Live" conforms to the Debian 
definition.


I am moderately bandwidth challenged and have a tendency to do multiple 
from scratch installs. I usually purchase a DVD set. If I want to only 
see if a new release solves a problem I will download DVD#1 of the set 
and then install from a USB copy. YMMV.







Re: help with installation?

2019-12-19 Thread Kenneth Parker
On Thu, Dec 19, 2019, 9:19 AM Greg Wooledge  wrote:

> On Thu, Dec 19, 2019 at 12:47:56PM +, Joe wrote:
> > > 1.  I want to install via Live USB.
>
> Why?  The Live images are not meant to be installed.  They're meant
> to be run from removable media.
>

That was never my understanding.  If you are, as I used to be, "Internet
Challenged", go somewhere, where you can "borrow Internet", get the full
DVD, make sure that it works, and then install it from the DVD.

Then, go to the Coffee House and upgrade it.   (Yes:  "good old days").

Also, if the Live Images are not meant to be installed, why supply a Good,
Working Install routine?

Kenneth Parker

>


Re: Home made backup system

2019-12-19 Thread tomas
On Thu, Dec 19, 2019 at 08:51:51AM -0500, Greg Wooledge wrote:
> On Thu, Dec 19, 2019 at 10:03:57AM +0200, Andrei POPESCU wrote:
> > On Mi, 18 dec 19, 21:42:21, rhkra...@gmail.com wrote:
> > > On Wednesday, December 18, 2019 12:26:04 PM to...@tuxteam.de wrote:
> > > >   #!/bin/bash
> > > >   home=${HOME:-~}
> > 
> > It will set the variable 'home' to the value of the variable 'HOME' if 
> > set (yes, case matters), otherwise to '~'.
> 
> It appears to expand the ~, rather than assigning a literal ~ character
> to the variable.

For bash, it's in the docs:

Quoth the man page:

   ${parameter:-word}
  Use Default Values.  If parameter is unset or null, the expansion
  of word is substituted.  Otherwise, the value of parameter is
  substituted.

For the rest...

I agree that the shell is full of bashisms. I usually don't care very
much when it's a script "to use around home". Whenever scripts get
larger or more widely distributed, I put in some effort.

But thanks for your (as always) insightful comments!

[...]

> So, home=${HOME:-~} seems like some sort of belt-and-suspenders fallback
> check in case the script is executed in a context where $HOME hasn't been
> set.  Maybe in a systemd service or something similar?  That's all I
> can think of.

You are right: HOME belongs to the blessed shell variables (in bash, at
least). Moreover, tilde expansion is done, according to the docs, using
HOME.

Quoth (again) the man page:

  HOME   The home directory of the current user; the default argument
 for the cd builtin command.  The value of this variable is
 also used when performing tilde expansion.

In practical terms:

  tomas@trotzki:~$ export HOME=rumpelstilzchen
  tomas@trotzki:/home/tomas$ echo ~
  rumpelstilzchen

:-)

So this whole "fallback to tilde thing is redundant (at least in bash)!

Cheers
-- tomás


signature.asc
Description: Digital signature


Re: Debian 10.2 ne démarre pas

2019-12-19 Thread G2PC


Le 18/12/2019 à 23:22, Pascal Hambourg a écrit :
> Le 17/12/2019 à 01:39, G2PC a écrit :
>>
>> De plus en plus désagréable la communauté du libre.
>
> Je ne connais pas cette communauté, et n'en fais pas partie.
>
>> Le seul problème qui reste, c'est les entrée du debian qui ne fonctionne
>> pas sur mon système
>
> Déjà répondu :
>
>>> man efibootmgr
>
> Qu'est-ce qu'il te faut de plus ?

La commande n'a pas permis de supprimer toutes les entrées. Une seule
des deux entrées a été enlevée.
J'ai finalement du monter la partition EFI, pour supprimer le dossier
Debian, puis, seulement à ce moment la, utiliser la commande efibootmgr.
J'ai indiqué les étapes dans le sujet [Résolu] Debian 10.2 ne démarre pas

Ce qu'il faut de plus, de la courtoisie.
Quand une personne ouvre une demande, personne n'a a se sentir obligé de
répondre, par contre, répondre que l'on connaît la réponse, mais, qu'on
a la flemme de l'expliquer, autant ne rien dire.

Pour ma part, je ne connaissais pas la réponse, et, j'ai rédigé des
notes lisibles, pour les partager avec d'autres.
Merci, et, bonne fin d'année.



Re: help with installation?

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 12:47:56PM +, Joe wrote:
> > 1.  I want to install via Live USB.

Why?  The Live images are not meant to be installed.  They're meant
to be run from removable media.

> For the very lightest of light weight, do not use a live CD, use the
> netinstall, or if you have low-bandwidth Internet, the normal
> installation CD/DVD image. Select the graphical expert installation
> from the menu, and say no to the desktop options. You should end up
> with a command prompt, from which you can install whatever minimal
> graphical software you want.

Agreed.  There are only two images that should be considered for
installing Debian in a regular environment (broadband Internet
connection available):

1) The standard netinstall image,
   https://www.debian.org/CD/netinst/

2) The unofficial netinstall image with non-free firmware included,
   https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/

If you're installing on a laptop, or if you plan to use "wifi" during the
install (or both), you almost always want the second one.  The Debian web
pages do not link directly to it, because it includes non-free software,
which violates Debian's strict policy of Free Software.

Follow the links to

https://cdimage.debian.org/cdimage/unofficial/non-free/cd-including-firmware/10.2.0+nonfree/amd64/iso-cd/

and ignore the file with -edu- in the name.



Re: Home made backup system

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 09:47:03AM +0100, to...@tuxteam.de wrote:
> So this "if" means:
> 
>   if   ## if
>   test ##
>   -z "$home"   ## the value of $home is empty
>   -o   ## or
>   \!   ## there is NOT
>   -d "$home"   ## a directory named "$home"
>## we're homeless.

Expanding on what I said in a previous message, the reason this is not
portable is because parsing this kind of expression is hard, and shells
did not all agree on how to do it.

So rather than try to enforce some kind of difficult parsing within
test, POSIX decided to scrap the whole thing.  In POSIX's wording:

  The XSI extensions specifying the -a and -o binary primaries and the
  '(' and ')' operators have been marked obsolescent. (Many expressions
  using them are ambiguously defined by the grammar depending on the
  specific expressions being evaluated.) Scripts using these expressions
  should be converted to the forms given below.

Shells that don't support binary -o and -a are compliant by default, and
shells that DO support it are simply offering an extension.  BUT, this is
only true for some expressions involving -o and -a.  Not all expressions.

What POSIX actually settled on for the test command is a strict
interpretation based on the number of arguments passed.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html

  0 arguments:
Exit false (1).

  1 argument:
Exit true (0) if $1 is not null; otherwise, exit false.

  2 arguments:
If $1 is '!', exit true if $2 is null, false if $2 is not null.

If $1 is a unary primary, exit true if the unary test is true,
false if the unary test is false.

Otherwise, produce unspecified results.

  3 arguments:
If $2 is a binary primary, perform the binary test of $1 and $3.

If $1 is '!', negate the two-argument test of $2 and $3.

[OB XSI]  If $1 is '(' and $3 is ')', perform the unary test of
$2.   On systems that do not support the XSI option, the results
are unspecified if $1 is '(' and $3 is ')'.

Otherwise, produce unspecified results.

  4 arguments:
If $1 is '!', negate the three-argument test of $2, $3, and $4.

[OB XSI]  If $1 is '(' and $4 is ')', perform the two-argument
test of $2 and $3.   On systems that do not support the XSI option,
the results are unspecified if $1 is '(' and $4 is ')'.

Otherwise, the results are unspecified.

  >4 arguments:
The results are unspecified.


So... your binary -o and -a are only allowed as extensions in one of the
"results are unspecified" cases, e.g. when there are 5 or more arguments
given to test.  Your code above has 6 arguments, so this is allowable, if
a given shell chooses to attempt it.  Bash is one of the shells that does.

Still, you shouldn't be writing this type of code.  If you're going
to require bash extensions, just go all in and use [[ -z $v || ! -d $v ]]
instead.  Otherwise, string together two test commands.

(Also remember that test -a is a legacy synonym for test -e, so a shell
that wants to parse binary -a first has to figure out whether it's
looking at a unary -a or a binary -a.  Bash's [[ || ]] doesn't have
that problem.)

The POSIX page actually goes into a lot more detail about some of the
historical glitches with test.  It's worth a read.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16



Re: help with installation?

2019-12-19 Thread Michael Lange
Hi,

On Thu, 19 Dec 2019 20:13:42 +0800
kaye n  wrote:

> Hello, is this where I can ask for help?
> 
> I am not new to GNU/Linux, but I am new to Debian.  I actually don't
> know much despite being a Linux user for years, so here's a few
> questions before I start installing.
> 
> 1.  I want to install via Live USB.  I want a 64-bit debian.
> 
>  I am currently in the page:
>  https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/
> 
>  1.1  Which of these should I use?  I want the most lightweight.
>  debian-live-10.2.0-amd64-cinnamon.iso.torrent
>  debian-live-10.2.0-amd64-gnome.iso.torrent
>  debian-live-10.2.0-amd64-kde.iso.torrent
>  debian-live-10.2.0-amd64-lxde.iso.torrent
>  debian-live-10.2.0-amd64-lxqt.iso.torrent
>  debian-live-10.2.0-amd64-mate.iso.torrent
>  debian-live-10.2.0-amd64-standard.iso.torrent
>  debian-live-10.2.0-amd64-xfce.iso.torrent
> 

among these I think lxde and lxqt are the most lightweight choices.

>  1.2  I see above different names of desktop environment, but what
> is 'standard'?
>  (second to the last on the list)

Not sure about that, I always thought Gnome was debian's "standard".

> 
> 2.  After installing one of the above onto a desktop or laptop
> computer, it should already have a window manager, correct?

Yes (maybe with the exception of "standard", which I am not sure what
this is).

> 
>   2.1  Is IceWM lighter than the window manager that comes with any
> of the above?

It certainly is.

> 
>2.2  If answer to 2.1 is yes, can I install it?
> 

Yes, I have been using IceWM here for ages.

>2.3  Can I use IceWM alone? That is, cinnamon, gnome, kde, lxde,
> lxqt, mate, or xfce,
>uninstalled, or disabled, and only IceWM running.  I'm assuming
> here that IceWM can
>can be used independently, and does not need to run on top of a
> desktop environment.

Sure, after installing one of the above systems you can install IceWM,
make it your default desktop sesssion and remove the others. At some
point there may be situations though when trying to completely remove
some pre-installed packages will cause other things to be removed which
you actually want to keep. But certainly no one forces you to actually
use the default desktop of your installation medium.

Regards

Michael

.-.. .. ...- .   .-.. --- -. --.   .- -. -..   .--. .-. --- ... .--. . .-.

You're dead, Jim.
-- McCoy, "Amok Time", stardate 3372.7



Re: Home made backup system

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 10:03:57AM +0200, Andrei POPESCU wrote:
> On Mi, 18 dec 19, 21:42:21, rhkra...@gmail.com wrote:
> > On Wednesday, December 18, 2019 12:26:04 PM to...@tuxteam.de wrote:
> > >   #!/bin/bash
> > >   home=${HOME:-~}
> 
> It will set the variable 'home' to the value of the variable 'HOME' if 
> set (yes, case matters), otherwise to '~'.

It appears to expand the ~, rather than assigning a literal ~ character
to the variable.

wooledg:~$ x=${FOO:-~}; echo "$x"
/home/wooledg

I'm not sure I would trust this, though.  Even if the standards require
this behavior (and I'd have to lawyer my way through them to try to
figure out whether they actually DO require it), I wouldn't trust all
shell implementations to get it right.

And in any case, $HOME and ~ should normally both be the same thing,
so long as the ~ isn't quoted, and the $HOME isn't single-quoted.

   Tilde Expansion
   [...]
   If  this  login name is the null string, the tilde is replaced with the
   value of the shell parameter HOME.  If HOME is unset, the  home  direc‐
   tory  of  the  user executing the shell is substituted instead.

So, home=${HOME:-~} seems like some sort of belt-and-suspenders fallback
check in case the script is executed in a context where $HOME hasn't been
set.  Maybe in a systemd service or something similar?  That's all I
can think of.

If that's the intent, then I might prefer something more explicit,
and less likely to trigger an obscure shell bug, like:

if [ -z "$HOME" ]; then HOME=~; export HOME; fi

Then you can simply use $HOME in the rest of the script.

(See also .  And if you're
a set -u person, too bad.  Mangle it for -u compatibility yourself.  You
should know how, or else you shouldn't be using -u.)



[Résolu] Debian 10.2 ne démarre pas

2019-12-19 Thread G2PC
*Installer le pilote de la carte graphique NVIDIA GEFORCE RTX 2060*

https://wiki.visionduweb.fr/index.php?title=Sommaire_des_tutoriels_pour_objets_numeriques#Installer_le_pilote_de_la_carte_graphique_NVIDIA_GEFORCE_RTX_2060


Par contre, je n'ai pas trouvé comment j'aurais pu faire, pour démarrer
en CPU, ce qui aurait pu être une alternative à l'installation du pilote
en mode rescue.
Quoi qu'il en soit, le pilote a été installé, ce qui a permis à Debian
de démarrer et de ne pas finir sur un écran noir.


Supprimer des entrées obsolètes de boot-efi qui apparaissent
dans le BIOS EFI

https://wiki.visionduweb.fr/index.php?title=Sommaire_S%C3%A9curit%C3%A9#Supprimer_des_entr.C3.A9es_obsol.C3.A8tes_de_boot-efi_qui_apparaissent_dans_le_BIOS_EFI

Lors de ma première installation, Debian a ajouté deux entrées dans le
BIOS EFI, qui sont restées présentes une fois que j'ai remplacé Debian
par un autre système.
J'ai pu identifier la méthode pour supprimer les entrées de Debian dans
le BIOS EFI.

Lors de la nouvelle réinstallation de Debian sur mon second disque SATA,
je constate à nouveau l'ajout de deux lignes concernant Debian dans le
BIOS EFI, qui semblent pointer vers le premier disque SSD.
Une ligne correspondrait certainement au mode EFI et l'autre au mode
Legacy. Cette fois, je laisse ses deux lignes, bien que je ne comprenne
pas leur utilité, puisque le Grub que j'utilise est installé via Mint,
sur la partition de Mint qui se trouve sur le SSD, alors que Debian est
installé sur le disque SATA.




Re: Home made backup system

2019-12-19 Thread Greg Wooledge
On Thu, Dec 19, 2019 at 09:53:46AM +0100, to...@tuxteam.de wrote:
> > ...
> > >>   if test -z "$home" -o \! -d "$home" ; then

The main issue here is that the use of the binary -o and -a operators
in "test" or "[" is not portable.  It might work in bash's implementation
of test (sometimes), but you can't count on it in other shells.

The preferred way to write this in a bash script would be:

if [[ -z $home || ! -d $home ]]; then

Or, in an sh script:

if test -z "$home" || test ! -d "$home"; then

or:

if [ -z "$home" ] || [ ! -d "$home" ]; then


> > the backslash is just protecting the ! operator 
> > which is the not operator on what follows.

In the shell, backslash is a form of quoting.  \! is exactly the same as
'!' but it's one character shorter, so you'll see people use the shorter
form a lot of the time.

You don't actually NEED to quote a lone ! character in a shell command.

wooledg:~$ echo hi !
hi !

However, when the ! character is NOT all alone, in bash's default
interactive mode (with history expansion enabled), certain !x
combinations can trigger unexpected and undesired history expansion.

wooledg:~$ set -o histexpand
wooledg:~$ echo hi!!
echo hiset -o histexpand
hiset -o histexpand

So, some people who have run into this in the past have probably
developed a defense mechanism of "always quote ! characters, no matter
what".  Which isn't wrong... but even then, it's not always enough.

History expansion is a bloody nightmare.  I recommend simply turning
it off and living without it.  Of course, that's a personal preference,
and you're free to continue banging your head against it, if you feel
that the times it helps you outweigh the times that it hurts you.

wooledg:~$ set -o histexpand
wooledg:~$ echo "Oh Yeah!.mp3"
bash: !.mp3: event not found

... and then, to add insult to injury, the command with the failed history
expansion isn't even recorded in the shell's history, so you can't just
"go up" and edit the line.  You have to start all over from scratch, or
copy and paste the command with the mouse like some kind of Windows user.



Re: Broken PMTUD / ICMP blackhole?

2019-12-19 Thread Celejar
On Wed, 18 Dec 2019 21:46:29 -0600
John Hasler  wrote:

> Celejar writes:
> >  ...the problem only occurs when tethering.
> 
> Which is the only time the cellular encapsulation is being done.


Understood. I had been responding to your point about the wifi
encapsulation.

Celejar



Re: help with installation?

2019-12-19 Thread Joe
On Thu, 19 Dec 2019 20:13:42 +0800
kaye n  wrote:

> Hello, is this where I can ask for help?
> 
> I am not new to GNU/Linux, but I am new to Debian.  I actually don't
> know much despite being a Linux user for years, so here's a few
> questions before I start installing.
> 
> 1.  I want to install via Live USB.  I want a 64-bit debian.
> 
>  I am currently in the page:
>  https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/
> 
>  1.1  Which of these should I use?  I want the most lightweight.
>  debian-live-10.2.0-amd64-cinnamon.iso.torrent
>  debian-live-10.2.0-amd64-gnome.iso.torrent
>  debian-live-10.2.0-amd64-kde.iso.torrent
>  debian-live-10.2.0-amd64-lxde.iso.torrent
>  debian-live-10.2.0-amd64-lxqt.iso.torrent
>  debian-live-10.2.0-amd64-mate.iso.torrent
>  debian-live-10.2.0-amd64-standard.iso.torrent
>  debian-live-10.2.0-amd64-xfce.iso.torrent
> 
>  1.2  I see above different names of desktop environment, but
> what is 'standard'?
>  (second to the last on the list)
> 
> 2.  After installing one of the above onto a desktop or laptop
> computer, it should already have a window manager, correct?
> 
>   2.1  Is IceWM lighter than the window manager that comes with
> any of the above?
> 
>2.2  If answer to 2.1 is yes, can I install it?
> 
>2.3  Can I use IceWM alone? That is, cinnamon, gnome, kde,
> lxde, lxqt, mate, or xfce,
>uninstalled, or disabled, and only IceWM running.  I'm
> assuming here that IceWM can
>can be used independently, and does not need to run on top of a
> desktop environment.
>Sorry if I can't make it clearer than that.
> 
> Thank you very much for your time.
> Kaye

For the very lightest of light weight, do not use a live CD, use the
netinstall, or if you have low-bandwidth Internet, the normal
installation CD/DVD image. Select the graphical expert installation
from the menu, and say no to the desktop options. You should end up
with a command prompt, from which you can install whatever minimal
graphical software you want.

You can use one of the installation options you mention: Gnome is the
Debian 'standard', but it also the heaviest. Lxde, lxqt and xfce are
the lightest desktops of the group. You may attempt to uninstall the
desktop after the system works, but that is a lot of work and only
worth doing if you have a really small HD.

I don't know how the window managers rate, but of course any of them is
lighter than a DE.

-- 
Joe



help with installation?

2019-12-19 Thread kaye n
Hello, is this where I can ask for help?

I am not new to GNU/Linux, but I am new to Debian.  I actually don't know
much despite being a Linux user for years, so here's a few questions before
I start installing.

1.  I want to install via Live USB.  I want a 64-bit debian.

 I am currently in the page:
 https://cdimage.debian.org/debian-cd/current-live/amd64/bt-hybrid/

 1.1  Which of these should I use?  I want the most lightweight.
 debian-live-10.2.0-amd64-cinnamon.iso.torrent
 debian-live-10.2.0-amd64-gnome.iso.torrent
 debian-live-10.2.0-amd64-kde.iso.torrent
 debian-live-10.2.0-amd64-lxde.iso.torrent
 debian-live-10.2.0-amd64-lxqt.iso.torrent
 debian-live-10.2.0-amd64-mate.iso.torrent
 debian-live-10.2.0-amd64-standard.iso.torrent
 debian-live-10.2.0-amd64-xfce.iso.torrent

 1.2  I see above different names of desktop environment, but what is
'standard'?
 (second to the last on the list)

2.  After installing one of the above onto a desktop or laptop computer, it
should already have a window manager, correct?

  2.1  Is IceWM lighter than the window manager that comes with any of
the above?

   2.2  If answer to 2.1 is yes, can I install it?

   2.3  Can I use IceWM alone? That is, cinnamon, gnome, kde, lxde,
lxqt, mate, or xfce,
   uninstalled, or disabled, and only IceWM running.  I'm assuming here
that IceWM can
   can be used independently, and does not need to run on top of a
desktop environment.
   Sorry if I can't make it clearer than that.

Thank you very much for your time.
Kaye


RE: Debian on raspberrypi: failed to configure wlan0

2019-12-19 Thread Bonno Bloksma
Hello Franco,

So just to be sure we understand you correctly, and anyone else who thinks this 
is the solution...

[]
> Thanks for your answer I've just solved thank reading this link [1] it was 
> the gateway line once commented all work fine. Now the wlan0 configuration 
> file is:
> 
>
> 
> ~# cat /etc/network/interfaces.d/wlan0
> # allow-hotplug wlan0
> iface wlan0 inet static
> address 192.168.0.9
> netmask 255.255.255.0
> network 192.168.0.0
> broadcast 192.168.0.255
> # gateway 192.168.0.1
> wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
> 
> Debian on raspberrypi works great I've cups, bind9, isc-dhcp-server running 
> fine, if you are unsure give it a try.
> 
> 
> [1]
> https://raspberrypi.stackexchange.com/questions/13895/solving-rtnetlink-answers-file-exists-when-running-ifup

The discussion behind this links talks about the fact that a system can have 
only one default gateway, there can be only one gateway statement in the 
interfaces file(s).
As you show us the config for one file in the interfaces.d/ directory, can we 
assume you have another interface that is up and running for which there is a 
separate file in interfaces.d/ ?
That file might then not even have a gateway statement if it used dhcp.

Bonno Bloksma



Re: Home made backup system

2019-12-19 Thread tomas
On Wed, Dec 18, 2019 at 10:38:26PM -0500, songbird wrote:
> rhkra...@gmail.com wrote:
> ...
> >>   if test -z "$home" -o \! -d "$home" ; then
> >
> > What does the -o \! do -- hmm, I guess \! is a bash "refeence" to the owner 
> > -- 
>   no, -o is logical or in that context.

Yes, exactly: it's not bash operating on that, but test [1],
so for bash it's a plain old parameter passed to test.

> the backslash is just protecting the ! operator 
> which is the not operator on what follows.

Again, this is supposed to be passed to test unharmed,
so the \ is telling bash "nothing to see here, pass
along).

>   i'm not going to go any further with reading
> whatever script that is.  i don't want to be
> here all evening.  ;)

Shell can be entertaining, can't it [2]?

Cheers

[1] Of course, this was a little white lie: there is a /bin/test,
   but for bash "test" is a built in, so it's part of bash anyway,
   but it behaves as if it were a binary. Oh, my ;-)

[2] Recommended: Greg Wooledge's pages. He's a regular here. He
   knows much more about shells than me!
   https://mywiki.wooledge.org/

-- tomás


signature.asc
Description: Digital signature


Re: Home made backup system

2019-12-19 Thread tomas
On Wed, Dec 18, 2019 at 09:42:21PM -0500, rhkra...@gmail.com wrote:
> Thanks to all who replied!
> 
> This script (or elements of it) looks useful to me, but I don't fully 
> understand it -- I plan to work my way through it -- I have a few questions 
> now, I'm sure I will have more after I get past the first 3 (or more 
> encouraging to me, first 6) lines.
> 
> Questions below:
> 
> On Wednesday, December 18, 2019 12:26:04 PM to...@tuxteam.de wrote:
> > On Wed, Dec 18, 2019 at 12:02:56PM -0500, rhkra...@gmail.com wrote:
> 
> >   #!/bin/bash
> >   home=${HOME:-~}
> 
> What does that line do, or more specifically, what does the :-~ do -- note 
> the 
> following:

The "-" doesn't belong to the "~" but to the ":" ;-)

The construction is (see the section "Parameter Expansion" in the bash
manual):

   ${parameter:-word}
 Use Default Values.  If parameter is unset or null, the expansion
 of word is substituted.  Otherwise, the value of parameter is
 substituted.

("parameter" is the bash manual's jargon for what we colloquially call
"shell variable").

So this means: "if HOME is set, then use that. Otherwise use whatever
tilde ('~') expands to".

This is my way to find a home, but to allow the script's user to override
it by setting HOME to some other value.

> rhk@s19:/rhk/git_test$ echo ${HOME:-~}
> /home/rhk
> rhk@s19:/rhk/git_test$ echo ${HOME}
> /home/rhk
> 
> >   if test -z "$home" -o \! -d "$home" ; then
> 
> What does the -o \! do -- hmm, I guess \! is a bash "refeence" to the owner 
> -- 
> I guess I should look for it in man bash...

No, this exclamation mark ain't for bash -- it's an argument to "test"
which it interprets as "not". Since the "!" can mean to bash something
in some contexts, as you found out, I escaped it with the "\" [1].

So this "if" means:

  if   ## if
  test ##
  -z "$home"   ## the value of $home is empty
  -o   ## or
  \!   ## there is NOT
  -d "$home"   ## a directory named "$home"
   ## we're homeless.

> I'm sure I'll have more questions as I continue, but that is enough for me 
> for 
> tonight.

Questions welcome!

Cheers

[1] Actually, on revisiting things, I would tend to write '!' instead
   of \! these days.

-- tomás


signature.asc
Description: Digital signature


Re: Home made backup system

2019-12-19 Thread Andrei POPESCU
On Mi, 18 dec 19, 21:42:21, rhkra...@gmail.com wrote:
> On Wednesday, December 18, 2019 12:26:04 PM to...@tuxteam.de wrote:
> 
> >   #!/bin/bash
> >   home=${HOME:-~}
> 
> What does that line do, or more specifically, what does the :-~ do -- note 
> the 
> following:

It will set the variable 'home' to the value of the variable 'HOME' if 
set (yes, case matters), otherwise to '~'.

See the bash manpage, section 'Parameter Expansion'.

Kind regards,
Andrei
-- 
http://wiki.debian.org/FAQsFromDebianUser


signature.asc
Description: PGP signature