Hi, I am faced with the problem on how to tackle multiline output from an init.d script, which I have just converted to LSB. Since the package is mdadm and RAID is kinda essential to those that have it configured, I'd rather not hide information but give the user the entire process.
In my ideal world, this is what it would look like: Starting RAID devices ... /dev/md0 has been started with 3 drives. /dev/md1 has been started with 3 drives. /dev/md2 assembled from 2 drives - need all 3 to start it /dev/md3 assembled from 1 drive - not enough to start the array. /dev/md4 has been started with 3 drives. ... done assembling RAID devices: failed. I don't seem to be able to realise this with lsb-base, nor does it seem that they even provide for this. The alternative -- all in one line -- just seems rather uninviting: Starting RAID devices ... /dev/md0 has been started with 3 drives, /dev/md1 has been started with 3 drives, /dev/md2 assembled from 2 drives - need all 3 to start it, /dev/md3 assembled from 1 drive - not enough to start the array, /dev/md4 has been started with 3 drives. failed. Generally, I would not have a problem doing something like Starting RAID devices ... failed (see log for details). But the problem is quite simply that by the time the script runs, /var may not be there, and neither is /usr/bin/logger. So what to do? My current approach, which is to map short terms to the long errors is just too much of an obfuscating hack, and it runs more than 80 characters as well: Starting RAID devices ... md0 started, md1 started, md2 degraded+started, md3 degraded+failed, md4 started ... failed. Any suggestions? -- Please do not send copies of list mail to me; I read the list! .''`. martin f. krafft <[EMAIL PROTECTED]> : :' : proud Debian developer and author: http://debiansystem.info `. `'` `- Debian - when you have better things to do than fixing a system drink canada dry! you might not succeed, but it *is* fun trying.
signature.asc
Description: Digital signature (GPG/PGP)