From eng at pinenet.com Thu Apr 5 10:28:46 2018 From: eng at pinenet.com (Rick Engebretson) Date: Thu, 5 Apr 2018 10:28:46 -0500 Subject: [tclug-list] Confused programmer: solved. Message-ID: I got my serial port modem control lights to blink and wait for interrupts using a SIIG 16550 UART PCI card. It's an old program, but FreePascal helps me read it still. The trick was to use un-named pipes and forked waiting listener processes. Forget the "threads" confusion. Basically, 5 processes. Four to separately listen to modem control lines DSR, CTS, DCD, RNG. And one to manage all the setup and interface. But I really like old fashioned FreePascal (TurboPascal) strings and reading and writing. Forget the null terminated C string glop. And the Pascal tools work beautifully on the serial port. Since Pascal text reading and writing each require their own open file descriptor, and the Linux ioctl for modem control needs the C generated file descriptor, I was stumped; "What is the file descriptor?" Luckily, I have (at least) 2 books, "The Design of the Unix Operating System" by Maurice Bach and "The Linux Process Manager" by John O'Gorman. It seems Unix inventors already thought of this situation. And when you think about it, all the glop on your Linux box starts from one process. Only an old Minnesota penguin would enjoy learning about user file descriptor table vs. file table vs. inode table. Unix and Linux must now be regarded as "critical infrastructure." These systems have outlasted cars, roofs, furnace. The available documentation is extraordinary. Old can be very good. From tclug at thelinuxshack.com Thu Apr 5 16:54:04 2018 From: tclug at thelinuxshack.com (Nicholas Schuetz) Date: Thu, 05 Apr 2018 21:54:04 +0000 Subject: [tclug-list] Service Broker Architecture on OpenShift Message-ID: For anyone who's interested, we're having a talk about the Service Broker Architecture in our next OpenShift and Kubernetes Minnesota Meetup this coming Monday: https://www.meetup.com/Minneapolis-OpenShift-Meetup/events/248994733/ The Draft Horse will be catering the food and drinks. There will be some SWAG and a couple of items raffled off. It's a really good opportunity to come talk about Linux Containers and Kubernetes with folks from all around in various industries. All are welcome to join. Hope to see you there. - Nick -------------- next part -------------- An HTML attachment was scrubbed... URL: From iznogoud at nobelware.com Fri Apr 6 17:52:21 2018 From: iznogoud at nobelware.com (Iznogoud) Date: Fri, 6 Apr 2018 22:52:21 +0000 Subject: [tclug-list] Confused programmer: solved. In-Reply-To: References: Message-ID: <20180406225221.GA24742@nobelware.com> > > Since Pascal text reading and writing each require their own open file > descriptor, and the Linux ioctl for modem control needs the C generated > file descriptor, I was stumped; "What is the file descriptor?" > Just about all I/O is done this way programmatically (files, pipes, sockets, and all else you can think). Streams, like "FILE *fp" type, have an integer file-descriptor handle associated with them, and you can go back-and-forth between the two if you so please. > Luckily, I have (at least) 2 books, "The Design of the Unix Operating > System" by Maurice Bach and "The Linux Process Manager" by John > O'Gorman. It seems Unix inventors already thought of this situation. And > when you think about it, all the glop on your Linux box starts from one > process. Only an old Minnesota penguin would enjoy learning about user > file descriptor table vs. file table vs. inode table. > How do you like the first of those two books? I do not need to read anything else right now, as my list is growing, but maybe this is a book I should have. "init" is the process you have in mind here. In some computer architectures and OS designs, this is not the case. Amiga comes to mind, which was a true multi-tasking OS that had its kernel built-in to the hardware ("Kickstart" was the name of that "BIOS-like thing). Much love for Amiga here. "Learning" is not for "old people" but for everyone. I wish more of my friends devoted the time to learn about things like this. I wish I had read more of this when I was younger. Keep learning. And my recommendation to you is to pick a C book and learn that and steer away from Pascal. Respect for Niklaus Wirth, but really, really try to get yourself to a better and more versatile place. My 2 euro-cents. > Unix and Linux must now be regarded as "critical infrastructure." These > systems have outlasted cars, roofs, furnace. The available documentation > is extraordinary. Old can be very good. Passed the test of time, and the test of Microsoft. In the 90s, everyone was changing to Windows. Circa 2005 there was an emergence of Linux. Now users are essentially OS agnostic in many ways, and this is in part due to the enormous popularity and versatility of Linux (based on the Unix philosophy and design). And I will say that Linux is far from "old" if you really want to be technical. One of its biggest advantages is the eagerness with which developers around the world --independent enthusiasts or company employees-- add new features to the kernel and the GNU foundation of the OS. At present, it is galloping forward, and as a result more incompatibilities appear, more patches are issued, and the kernel management is harder and harder work for those at the top. But we are all benefiting from this. I'd rather not go back to the old days; the future is bright. There is a "Hardcore Hackday" meetup that I recently attended. You should see the diversity of geekiness that was there... and most of us were Linux/Unix people. Fun times were had and I met two of the readers of this list. From eng at pinenet.com Fri Apr 6 20:45:55 2018 From: eng at pinenet.com (Rick Engebretson) Date: Fri, 6 Apr 2018 20:45:55 -0500 Subject: [tclug-list] Confused programmer: solved. In-Reply-To: <20180406225221.GA24742@nobelware.com> References: <20180406225221.GA24742@nobelware.com> Message-ID: <2d487dc6-7a6e-30b2-d5c9-bc1c800dbd0e@pinenet.com> As always, thanks. Ancient FreePascal uses a "Text" file type. Other file types exist, but the Text file type creates a special buffer and record (structure in C). The string type includes a length byte as the first character of the array. The file is opened with "reset" and "rewrite" as read-only and write-only and a new file descriptor is part of each record. Functions Readln and writeln automatically do end of line IO. String ops are also very simple. If you want to do pointers to arrays and null terminated C heap allocation you are far smarter than me. The BaseUnix FreePascal library is a direct C translation and does just that. An (Atmel) AVR assembler (GAVRasm) is written in FreePascal because of string handling. I really like the Bach book. Purchased well used, my clumsy fingers have to work at turning the pages. It has many of the same diagrams as Richard Stevens later great book (I forgot to mention) that covers "file sharing" much better. My big takeaway is if I'm an incompetent program designer, I'm not too far off. As for your "euro 2 cents" it buys a lot. I enjoyed reading EU efforts to develop new car technology and mentioned Linux, etc. A Finlander replied. Then I get email from a local farmer who insists corn is king, and he wants to borrow money for a used Lincoln Town Car. After the snow melts and 5 feet of ground thaws he might get his corn and beans in by summer solstice this year. Innovation is a struggle. Iznogoud wrote: >> >> Since Pascal text reading and writing each require their own open file >> descriptor, and the Linux ioctl for modem control needs the C generated >> file descriptor, I was stumped; "What is the file descriptor?" >> > > Just about all I/O is done this way programmatically (files, pipes, sockets, > and all else you can think). Streams, like "FILE *fp" type, have an integer > file-descriptor handle associated with them, and you can go back-and-forth > between the two if you so please. > > >> Luckily, I have (at least) 2 books, "The Design of the Unix Operating >> System" by Maurice Bach and "The Linux Process Manager" by John >> O'Gorman. It seems Unix inventors already thought of this situation. And >> when you think about it, all the glop on your Linux box starts from one >> process. Only an old Minnesota penguin would enjoy learning about user >> file descriptor table vs. file table vs. inode table. >> > > How do you like the first of those two books? I do not need to read anything > else right now, as my list is growing, but maybe this is a book I should have. > > "init" is the process you have in mind here. In some computer architectures > and OS designs, this is not the case. Amiga comes to mind, which was a true > multi-tasking OS that had its kernel built-in to the hardware ("Kickstart" was > the name of that "BIOS-like thing). Much love for Amiga here. > > "Learning" is not for "old people" but for everyone. I wish more of my friends > devoted the time to learn about things like this. I wish I had read more of > this when I was younger. Keep learning. And my recommendation to you is to pick > a C book and learn that and steer away from Pascal. Respect for Niklaus Wirth, > but really, really try to get yourself to a better and more versatile place. > My 2 euro-cents. > > >> Unix and Linux must now be regarded as "critical infrastructure." These >> systems have outlasted cars, roofs, furnace. The available documentation >> is extraordinary. Old can be very good. > > Passed the test of time, and the test of Microsoft. In the 90s, everyone was > changing to Windows. Circa 2005 there was an emergence of Linux. Now users are > essentially OS agnostic in many ways, and this is in part due to the enormous > popularity and versatility of Linux (based on the Unix philosophy and design). > > And I will say that Linux is far from "old" if you really want to be technical. > One of its biggest advantages is the eagerness with which developers around the > world --independent enthusiasts or company employees-- add new features to the > kernel and the GNU foundation of the OS. At present, it is galloping forward, > and as a result more incompatibilities appear, more patches are issued, and > the kernel management is harder and harder work for those at the top. But we > are all benefiting from this. I'd rather not go back to the old days; the > future is bright. > > There is a "Hardcore Hackday" meetup that I recently attended. You should see > the diversity of geekiness that was there... and most of us were Linux/Unix > people. Fun times were had and I met two of the readers of this list. > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list > From iznogoud at nobelware.com Mon Apr 9 10:18:15 2018 From: iznogoud at nobelware.com (Iznogoud) Date: Mon, 9 Apr 2018 15:18:15 +0000 Subject: [tclug-list] Confused programmer: solved. In-Reply-To: <2d487dc6-7a6e-30b2-d5c9-bc1c800dbd0e@pinenet.com> References: <20180406225221.GA24742@nobelware.com> <2d487dc6-7a6e-30b2-d5c9-bc1c800dbd0e@pinenet.com> Message-ID: <20180409151815.GA13197@nobelware.com> > > As for your "euro 2 cents" it buys a lot. I enjoyed reading EU efforts > to develop new car technology and mentioned Linux, etc. A Finlander > replied. Then I get email from a local farmer who insists corn is king, > and he wants to borrow money for a used Lincoln Town Car. After the snow > melts and 5 feet of ground thaws he might get his corn and beans in by > summer solstice this year. Innovation is a struggle. > Tell your local farmer that corn has more technology attached to it, and that a used TownCar's advance will not cut it. Suggest that they retire now; they seem to be dettached from the present and the future. I have a friend who works for a (mostly local) company called Sentera, which is a "precision agriculture" innovator. They typically fly drones to monitor crop-fields, to manage use of fertilizer. This is a positive development, in that, we know in recent years there has been excessive use of fertilizers in corn fields "just in case." The big implication is that water in some regions of Minnesota is un-drinkable, and the almighty Mississippi is taking more of thse poissons downstream. Using the advanced, robotics computer-vision methods, use of such chemicals can -in principle- be kept to a minimum. So it is a win. My personal views are more in-line with what has been happening in Detroit. I am proud to say that when my friends and I wanted to buy warehouse properties in Detroit and turn them into "urban agriculture" centers, we were not the only ones thinking about it. This is now happening in Detroit, and from what I heard on MPR last week, it is going ot be profitable. I wish I had followed through. In some ways, the (First) world is becoming a better place. From ryan.coleman at cwis.biz Mon Apr 9 23:38:02 2018 From: ryan.coleman at cwis.biz (Ryan Coleman) Date: Mon, 9 Apr 2018 23:38:02 -0500 Subject: [tclug-list] Confused programmer: solved. In-Reply-To: <20180409151815.GA13197@nobelware.com> References: <20180406225221.GA24742@nobelware.com> <2d487dc6-7a6e-30b2-d5c9-bc1c800dbd0e@pinenet.com> <20180409151815.GA13197@nobelware.com> Message-ID: <04C23451-B261-44C9-90AB-814B083F8328@cwis.biz> I?ll pipe in here the ?poisons? you refer to are mostly coming out of the Minnesota River Valley? > On Apr 9, 2018, at 10:18 AM, Iznogoud wrote: > > I have a friend who works for a (mostly local) company called Sentera, which > is a "precision agriculture" innovator. They typically fly drones to monitor > crop-fields, to manage use of fertilizer. This is a positive development, in > that, we know in recent years there has been excessive use of fertilizers in > corn fields "just in case." The big implication is that water in some regions > of Minnesota is un-drinkable, and the almighty Mississippi is taking more of > thse poissons downstream. Using the advanced, robotics computer-vision methods, > use of such chemicals can -in principle- be kept to a minimum. So it is a win. -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickm at citilink.com Fri Apr 13 18:49:08 2018 From: patrickm at citilink.com (Patrick McCabe) Date: Fri, 13 Apr 2018 18:49:08 -0500 (CDT) Subject: [tclug-list] resolv.conf Message-ID: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> Hi, For some reason I cannot connect to any umn.edu sites. If I '$ dig umn.edu' I get nothing. When I look at resolv.conf there is a line: search umn.edu I'd like to know how that got in there. Can someone point me in the right direction? Thanks, Patrick From ryan.coleman at cwis.biz Fri Apr 13 19:28:19 2018 From: ryan.coleman at cwis.biz (Ryan Coleman) Date: Fri, 13 Apr 2018 19:28:19 -0500 Subject: [tclug-list] resolv.conf In-Reply-To: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> References: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> Message-ID: <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> ?. Are you on the UMN network? Did you get a DHCP address? > On Apr 13, 2018, at 6:49 PM, Patrick McCabe wrote: > > Hi, > > For some reason I cannot connect to any umn.edu sites. If I '$ dig umn.edu' I get nothing. When I look at resolv.conf there is a line: > > search umn.edu > > I'd like to know how that got in there. Can someone point me in the right direction? > > Thanks, > Patrick > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list From patrickm at citilink.com Sat Apr 14 12:49:29 2018 From: patrickm at citilink.com (Patrick McCabe) Date: Sat, 14 Apr 2018 12:49:29 -0500 (CDT) Subject: [tclug-list] resolv.conf In-Reply-To: <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> References: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> Message-ID: <05a4a371-7981-c233-9b17-c81c6608b4f2@zok.mm.home> I'm on xfinity. I do VPN into the university some times. I'm wondering if something did not get cleaned up correctly the last time I disconnected. On 04/13/2018 07:28 PM, Ryan Coleman wrote: > ?. > > Are you on the UMN network? Did you get a DHCP address? > >> On Apr 13, 2018, at 6:49 PM, Patrick McCabe wrote: >> >> Hi, >> >> For some reason I cannot connect to any umn.edu sites. If I '$ dig umn.edu' I get nothing. When I look at resolv.conf there is a line: >> >> search umn.edu >> >> I'd like to know how that got in there. Can someone point me in the right direction? >> >> Thanks, >> Patrick >> _______________________________________________ >> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota >> tclug-list at mn-linux.org >> http://mailman.mn-linux.org/mailman/listinfo/tclug-list > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list From ryan.coleman at cwis.biz Sat Apr 14 14:54:59 2018 From: ryan.coleman at cwis.biz (Ryan Coleman) Date: Sat, 14 Apr 2018 14:54:59 -0500 Subject: [tclug-list] resolv.conf In-Reply-To: <05a4a371-7981-c233-9b17-c81c6608b4f2@zok.mm.home> References: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> <05a4a371-7981-c233-9b17-c81c6608b4f2@zok.mm.home> Message-ID: <7260C138-BA53-4776-9921-DE3E0DC24FA5@cwis.biz> I?m thinking that. Resolv.conf could just be emptied, reboot and see if that resolv(es) it? #punintended #dadjokes #IsItSpringYet > On Apr 14, 2018, at 12:49 PM, Patrick McCabe wrote: > > I'm on xfinity. I do VPN into the university some times. I'm wondering if something did not get cleaned up correctly the last time I disconnected. > > On 04/13/2018 07:28 PM, Ryan Coleman wrote: >> ?. >> >> Are you on the UMN network? Did you get a DHCP address? >> >>> On Apr 13, 2018, at 6:49 PM, Patrick McCabe wrote: >>> >>> Hi, >>> >>> For some reason I cannot connect to any umn.edu sites. If I '$ dig umn.edu' I get nothing. When I look at resolv.conf there is a line: >>> >>> search umn.edu >>> >>> I'd like to know how that got in there. Can someone point me in the right direction? >>> >>> Thanks, >>> Patrick >>> _______________________________________________ >>> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota >>> tclug-list at mn-linux.org >>> http://mailman.mn-linux.org/mailman/listinfo/tclug-list >> _______________________________________________ >> TCLUG Mailing List - Minneapolis/St. Paul, Minnesota >> tclug-list at mn-linux.org >> http://mailman.mn-linux.org/mailman/listinfo/tclug-list > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list From iznogoud at nobelware.com Sat Apr 14 19:00:14 2018 From: iznogoud at nobelware.com (Iznogoud) Date: Sun, 15 Apr 2018 00:00:14 +0000 Subject: [tclug-list] resolv.conf In-Reply-To: <7260C138-BA53-4776-9921-DE3E0DC24FA5@cwis.biz> References: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> <05a4a371-7981-c233-9b17-c81c6608b4f2@zok.mm.home> <7260C138-BA53-4776-9921-DE3E0DC24FA5@cwis.biz> Message-ID: <20180415000014.GA27165@nobelware.com> I think you should have a look at what your system does to /etc/resolve.conf, or more specifically, how it builds it. Look here: /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf Also look at the man page for 'resolvconf" to get an idea of what is going on. Also look at the dhcpcd man page. I just cannot remember off hand if dhcpcd will take domain info from the dhcp server that provides the lease. From tclug1 at whitleymott.net Sun Apr 15 09:32:03 2018 From: tclug1 at whitleymott.net (gregrwm) Date: Sun, 15 Apr 2018 14:32:03 -0000 Subject: [tclug-list] multiple installs don't need partitions Message-ID: this seems to work in simple trials. i'm unsure tho if udev and kernel modules will be working from the right hierarchy, no doubt some of you will know.. >#!/bin/bash -f >#set a subdirectory as root directory (with no change to initrd)(multiple installs don't need partitions) >#simply specify on the kernel commandline: ># init=pat pathname from partition root to this script (chmod 744) ># subroot=foo pathname to become root directory ># partroot=par mountpoint within subroot where partition root will be left mounted >#menuentry "subroot foo" { #copy /etc/grub.d/40_custom to /etc/grub.d/07_custom and add menuentries like this example ># echo "subroot foo" ># set sub=foo ># search --no-floppy --fs-uuid --set=root 22e7c84a-a416-43e9-ae9d-ee0119fc3894 #use your partition's uuid ># linux /$sub/vmlinuz ro root=UUID=22e7c84a-a416-43e9-ae9d-ee0119fc3894 init=pat subroot=foo partroot=par ># echo "initrd /$sub/initrd.img" ># initrd /$sub/initrd.img #works in recent releases where this link is relative >#} >subroot(){ for a in $( do [[ $a = subroot=* ]]&& subroot=${a#*=} > [[ $a = partroot=* ]]&&partroot=${a#*=} > done > [[ $subroot ]]||{ echo no subroot on kernel cmdline;return 1;} > [[ $partroot ]]||{ echo no partroot on kernel cmdline;return 1;} > (set -x;mount --bind $subroot mnt)||return > for m in $(while read -r r;do r=($r) > [[ ${r[1]} = /?(mnt) ]]||echo ${r[1]} #excluding / and /mnt > done do (set -x;mount --bind $m mnt$m)||return #--bind whatever's already mounted > done > set -x > cd mnt||return > pivot_root . $partroot >} >subroot&&exec chroot . init "$@"||exec bash -------------- next part -------------- An HTML attachment was scrubbed... URL: From patrickm at citilink.com Sun Apr 15 13:36:04 2018 From: patrickm at citilink.com (Patrick McCabe) Date: Sun, 15 Apr 2018 18:36:04 -0000 Subject: [tclug-list] resolv.conf In-Reply-To: <20180415000014.GA27165@nobelware.com> References: <28b3f2ca-a9ed-d597-ef85-09b87b6da6c4@zok.mm.home> <856CCD9C-D3D4-49BD-BC99-853D501E7028@cwis.biz> <05a4a371-7981-c233-9b17-c81c6608b4f2@zok.mm.home> <7260C138-BA53-4776-9921-DE3E0DC24FA5@cwis.biz> <20180415000014.GA27165@nobelware.com> Message-ID: <2cfe15ca-0fb3-3ef5-7699-66b510eb239e@zok.mm.home> A reboot fixed the problem. I am running ubuntu 17.11 which doesn't use dhcpd. The comments in resolv.conf mention systemd-resolve, so I will be looking into that as well as resolvconf when I find some spare time. Thanks for the help, Patrick On 04/14/2018 07:00 PM, Iznogoud wrote: > I think you should have a look at what your system does to /etc/resolve.conf, > or more specifically, how it builds it. Look here: > > /lib/dhcpcd/dhcpcd-hooks/20-resolv.conf > > Also look at the man page for 'resolvconf" to get an idea of what is going on. > Also look at the dhcpcd man page. > > I just cannot remember off hand if dhcpcd will take domain info from the > dhcp server that provides the lease. > > _______________________________________________ > TCLUG Mailing List - Minneapolis/St. Paul, Minnesota > tclug-list at mn-linux.org > http://mailman.mn-linux.org/mailman/listinfo/tclug-list From marc at e-skinner.net Thu Apr 26 15:56:44 2018 From: marc at e-skinner.net (Marc Skinner) Date: Thu, 26 Apr 2018 15:56:44 -0500 Subject: [tclug-list] FYI - good workhorse for sale Message-ID: https://minneapolis.craigslist.org/dak/sys/d/gently-used-mac-pro-2010/6572483869.html I have been using it for the last year as a KVM hypervisor with CentOS 7. Works great as a Linux hypervisor with 32gb ram, or of course, as a Mac system.