1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514
|
<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.1H.i">
<TITLE>The Linux Gazette 37: The Answer Guy</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="./../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="./../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<H3>Contents:</H3>
<p><a href="#tag_greeting"
><img src="./../gx/dennis/bbub.gif" alt="(!)" border="0"
align="middle"><strong>Greetings From Jim Dennis</strong></A></p>
<DL>
<!-- index_text begins -->
<dt><A HREF="tag/1.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>serial port settings --or--
<dd><A HREF="tag/1.html"
><strong>
Another Damn WinModem
</strong></a>
<dt><A HREF="tag/2.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Simplified Security? --or--
<dd><A HREF="tag/2.html"
><strong>
Simple Security Tips
</strong></a>
<dt><A HREF="tag/3.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>eterm quickie + general commment (linux SUPERGRAN)</strong></a><dt><A HREF="tag/4.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>nr_files and nr_inodes --or--
<dd><A HREF="tag/4.html"
><strong>
Max Open Files and Inodes: Use The Entries under <TT>/proc</TT>
</strong></a>
<dt><A HREF="tag/5.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>setting up an ISP to serve email</strong></a><dt><A HREF="tag/6.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Getting my new linux box to run the ftp server</strong></a><dt><A HREF="tag/7.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>setting up an ISP to serve email --or--
<dd><A HREF="tag/7.html"
><strong>
Setting up ISP Mail Services
</strong></a>
<dt><A HREF="tag/8.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>[Fwd: rsh on 2.0.34] --or--
<dd><A HREF="tag/8.html"
><strong>
More on: 'rsh' as 'root' Denied
</strong></a>
<dt><A HREF="tag/9.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>procmail --or--
<dd><A HREF="tag/9.html"
><strong>
'procmail' to Get Mail via POP-3? No. 'fetchmail'
</strong></a>
<dt><A HREF="tag/10.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Linux Diagnostic Tool --or--
<dd><A HREF="tag/10.html"
><strong>
Hardware Info Under Linux: MSD.EXE Clone?
</strong></a>
<dt><A HREF="tag/11.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>X terminals via serial links? --or--
<dd><A HREF="tag/11.html"
><strong>
X Windows Over a Serial Line (Null Modem)
</strong></a>
<dt><A HREF="tag/12.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>copy of Microsoft Office --or--
<dd><A HREF="tag/12.html"
><strong>
Free Copy of MS Office for Linux? It isn't April Yet!
</strong></a>
<dt><A HREF="tag/14.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>diald modem settings E71 --or--
<dd><A HREF="tag/14.html"
><strong>
Using "odd" modem settings
</strong></a>
<dt><A HREF="tag/15.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Further answers to questions? --or--
<dd><A HREF="tag/15.html"
><strong>
Sometimes Short of the Question
</strong></a>
<dt><A HREF="tag/16.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Steven Hancock: ps to gif --or--
<dd><A HREF="tag/16.html"
><strong>
More on: Automated PostScript (ps) to GIF Conversion
</strong></a>
<dt><A HREF="tag/17.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>"Routing and Subnetting 101" Linux Gazzette 1/1/99 --or--
<dd><A HREF="tag/17.html"
><strong>
Re: Routing and Subnetting for Classes
</strong></a>
<dt><A HREF="tag/18.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Partitioning my new Linux box... --or--
<dd><A HREF="tag/18.html"
><strong>
Disk Partitioning: Review
</strong></a>
<dt><A HREF="tag/19.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Curious modem hangup... --or--
<dd><A HREF="tag/19.html"
><strong>
PPP Disconnects
</strong></a>
<dt><A HREF="tag/21.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>ifconfig reports TX errors on v2.1.x kernels --or--
<dd><A HREF="tag/21.html"
><strong>
'ifconfig': TX errors
</strong></a>
<dt><A HREF="tag/22.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>System clock is too fast... --or--
<dd><A HREF="tag/22.html"
><strong>
Ahh ... The Toils of Time
</strong></a>
<dt><A HREF="tag/23.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>you are the man --or--
<dd><A HREF="tag/23.html"
><strong>
The Complaint Department: Typos and Grammatical Errors
</strong></a>
<dt><A HREF="tag/29.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>modem disconnect problem?</strong></a><dt><A HREF="tag/30.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>modem problems under linux --or--
<dd><A HREF="tag/30.html"
><strong>
X Prevents/Kills Modem Connection
</strong></a>
<dt><A HREF="tag/31.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>I want my 10 GIGS!!! --or--
<dd><A HREF="tag/31.html"
><strong>
Ultra-DMA and the 8.4Gb IDE Disk Limit
</strong></a>
<dt><A HREF="tag/32.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>LTT submission</strong></a><dt><A HREF="tag/33.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Is it possible to run Debian on 4 MB? --or--
<dd><A HREF="tag/33.html"
><strong>
Low Memory Installation
</strong></a>
<dt><A HREF="tag/34.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Better resolution (laptop LCD) --or--
<dd><A HREF="tag/34.html"
><strong>
Higher Resolution X on a Laptop
</strong></a>
<dt><A HREF="tag/37.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Dos</strong></a><dt><A HREF="tag/38.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Low Level Formatting</strong></a><dt><A HREF="tag/39.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Bad Sectors in my HDD --or--
<dd><A HREF="tag/39.html"
><strong>
Removing Bad Sectors
</strong></a>
<dt><A HREF="tag/41.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Help --or--
<dd><A HREF="tag/41.html"
><strong>
Netscape Communicator: "Improper DNS Type"?
</strong></a>
<dt><A HREF="tag/42.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Communicator and PGP on Linux --or--
<dd><A HREF="tag/42.html"
><strong>
NS Communicator (Mail) and PGP
</strong></a>
<dt><A HREF="tag/43.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Uh, where'd my "man" go? --or--
<dd><A HREF="tag/43.html"
><strong>
'fsck' Breaks 'man' Pages?
</strong></a>
<dt><A HREF="tag/44.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Custom Install --or--
<dd><A HREF="tag/44.html"
><strong>
Unable to Open Console: After "Custom" Install
</strong></a>
<dt><A HREF="tag/45.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Securing a modem dial-out line.</strong></a><dt><A HREF="tag/46.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Why can I only login as root? --or--
<dd><A HREF="tag/46.html"
><strong>
Another "No Login" Problem
</strong></a>
<dt><A HREF="tag/47.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>RAM</strong></a><dt><A HREF="tag/48.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>I used gzip in bad way... help! --or--
<dd><A HREF="tag/48.html"
><strong>
Accidental Deletion
</strong></a>
<dt><A HREF="tag/49.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>TCP patch for SACK? (RFC 2018) --or--
<dd><A HREF="tag/49.html"
><strong>
TCP/IP SACK Support: When? Now!
</strong></a>
<!-- index_text ends -->
</DL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag_greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="./../gx/dennis/bbubble.gif"
height="50" width="60" alt="(!) " border="0"
>Greetings from Jim Dennis</H3>
<!-- begin greeting -->
<p>
Well, the 2.2 kernel is finally out. Indeed the 2.2.1 patch
has also made its way onto the scene (you just knew they'd find
something worth fixing in the first week).
</p>
<p>
If you're considering upgrading you'll want to look through the
list of required/suggested package upgrades to go with that.
Although most code in userspace isn't affected much by kernel
changes there are always some utilities and applications that
will be.
</p>
<p>
Of course, you can install a new kernel right along side your
existing one --- and reboot between them with glee. Remember
LILO is a multi-boot utility as well as a boot loader --- so
you can easily add new entries to it.
</p>
<p>
Thus upgrade will be much easier than the migration from 1.2
to 2.0 (when the structure of many /proc interfaces changed ---
breaking the '<tt>ps</tt>' related utilities). That's good since there
are probably close to ten times more Linux users now.
</p>
<p>
Of course the faint-hearted can just wait for their friendly
distribution maintainer to put out an all new version with
the 2.2.x kernel and all the new utilities pre-built. However,
what would the fun be in that.
</p>
<p>
To learn more about upgrading your kernel look LinuxHQ
(<a href="http://www.linuxhq.com/"
>http://www.linuxhq.com/</a>). They have about a half dozen links
to pages on the subject (particularly with lists of requisite
package upgrades and links to the tar.gz files and even one
site that has links to the requisite RPMs).
</p>
<p>
After you upgrade you'll want to keep you eyes on those sites,
checking back over the next couple of months. There will probably
be other packages that are found "wanting" (unready for 2.2).
</p>
<p>
If you get that all installed, read all my rantings for this
month and are still bored --- take a look at the
"Linux Tips & Tricks" site
(<a href="http://www.patoche.org/LTT/">http://www.patoche.org/LTT/</a>)
and considering adding your own suggestions to the mix.
</p>
<p>
I added a couple myself. I also suggested to the site
maintainer that he link to LG's "2-cent Tips" and to the
Linux-Tips HOWTO
(<a href="http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html"
>http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html</a>).
</p>
<p>
While we're on the subject of "tips" here's one for you
budding shell scripters and programmers out there:
</p>
<blockquote>
If you have to use /tmp --- do it safely. Sure,
you script is running on a single-user workstation
now. But eventually you'll use it on a multi-user
machine or someone will copy it. There are all
sorts of nasty tricks people can play on you
involving symlinks in /tmp.
</blockquote>
<blockquote>
Here's one way:
</blockquote>
<blockquote><pre>
TMPD=/tmp/$0$$$(date +%s)
## get a (hopefully unique) name
## use any reasonable method for this.
OMASK=$(umask)
umask 077 || exit 1
mkdir $TMPD || exit 1
trap 'rm -fr $TMPD; exit' 0
umask $OMASK
</pre></blockquote>
<blockquote>
... this should either successfully make a safe, private
directory under /tmp (and you use $TMPD for the rest of
your temporary file operations --- using whatever names
you want) or it should fail. There should be no race
condition since the new directory should be made with the
appropriate permissions in a single system call (and
my strace output under Linux/bash confirms that).
</blockquote>
<blockquote>
The part to be careful of is the '<tt>trap</tt>' clause. That
should automatically remove the temp directory and files
on exit (normal or in response to any trappable signals).
(If you use a <tt>kill -KILL</tt> on that script while it's running
--- it won't get a chance to clean up after itself, but a
normal [Ctrl]-[C] and most other kill signals should be
fine. I still suggest using your own private <tt>~/tmp</tt>
directory whenever that's feasible (but not if your
<tt>$HOME</tt> is served over NFS).
</blockquote>
<blockquote>
I'll be teaching a class in shell scripting at Mission
College (Santa Clara, CA) starting tomorrow. That should
be interesting.
</blockquote>
<!-- end greeting -->
<!--======================================================= -->
<P> <hr> <P>
<center><H4>Previous "Answer Guy" Columns</H4></center>
<P>
<A HREF="../issue13/answer.html">Answer Guy #1, January 1997</A><BR>
<A HREF="../issue14/answer.html">Answer Guy #2, February 1997</A><br>
<A HREF="../issue15/answer.html">Answer Guy #3, March 1997</A><br>
<A HREF="../issue16/answer.html">Answer Guy #4, April 1997</A><br>
<A HREF="../issue17/answer.html">Answer Guy #5, May 1997</A><br>
<A HREF="../issue18/lg_answer18.html">Answer Guy #6, June 1997</A><br>
<A HREF="../issue19/lg_answer19.html">Answer Guy #7, July 1997</A><br>
<A HREF="../issue20/lg_answer20.html">Answer Guy #8, August 1997</A><br>
<A HREF="../issue21/lg_answer21.html">Answer Guy #9, September 1997</A><br>
<A HREF="../issue22/lg_answer22.html">Answer Guy #10, October 1997</A><br>
<A HREF="../issue23/lg_answer23.html">Answer Guy #11, December 1997</A><br>
<A HREF="../issue24/lg_answer24.html">Answer Guy #12, January 1998</A><br>
<A HREF="../issue25/lg_answer25.html">Answer Guy #13, February 1998</A><br>
<A HREF="../issue26/lg_answer26.html">Answer Guy #14, March 1998</A><br>
<A HREF="../issue27/lg_answer27.html">Answer Guy #15, April 1998</A><br>
<A HREF="../issue28/lg_answer28.html">Answer Guy #16, May 1998</A><br>
<A HREF="../issue29/lg_answer29.html">Answer Guy #17, June 1998</A><br>
<A HREF="../issue30/lg_answer30.html">Answer Guy #18, July 1998</A><br>
<A HREF="../issue31/lg_answer31.html">Answer Guy #19, August 1998</A><BR>
<A HREF="../issue32/lg_answer32.html">Answer Guy #20, September 1998</A><BR>
<A HREF="../issue33/lg_answer33.html">Answer Guy #21, October 1998</A><BR>
<A HREF="../issue34/lg_answer34.html">Answer Guy #22, November 1998</A><BR>
<A HREF="../issue35/lg_answer35.html">Answer Guy #23, December 1998</A><BR>
<A HREF="../issue36/lg_answer36.html">Answer Guy #24, January 1998</A><BR>
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright ©</a> 1999, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 37 February 1999</H5>
<P> <hr> <P>
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="./index.html"
><IMG SRC="./../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
<A HREF="../index.html"
><IMG SRC="./../gx/homenew.gif" ALT="[ Front Page ]"></A>
<A HREF="./lg_bytes37.html"
><IMG SRC="./../gx/back2.gif" ALT="[ Previous Section ]"></A>
<A HREF="./york.html"
><IMG SRC="./../gx/fwd.gif" ALT="[ Next Section ]"></A>
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->
|