How make auto-startup menu for systemrescuecd - iso

I looking solution to my question. I download ISO of SystemRescueCD and I know how to add some paarameters to linux line but I dont know how to make it auto running menu.
In fact I put there DEFAULT directive which highlight menu position and that last think, how to automaticlly run ?

It seems as easy job. All what you need is edit a sysrescd_head.cfg file and put DEFAULT and TIMEOUT directive. Remeber that. Timeout takes values in 1/10 of seconds so '10' is in fact (10/10 = 1) one second waiting

Related

Displaying the Line Number during the execution of a Pick Basic Program in uniVerse

I am utilizing Pick Basic on the uniVerse operating system. Many times, I will need to watch a variable change during a debugging session. I will locate the variable throughout the program and note every time it can possibly be modified. I will then go into the program and during its execution, I have the program display the value of the variable on the screen along with the line number of the source code. For argument's sake, let us say that the variable name is begdate and in this case, on line 146, I set it to today's date. I will add the proceeding line:
146: begdate = DATE()
147: DISPLAY "Line 147: ":OCONV(begdate,"D4-")
This works just fine. But, if the program can possibly change this variable on many different lines, once I start adding or subtracting lines to the source code, the display is usually not displaying the correct line number anymore because the line number is hardcoded.
Does Pick Basic have any system variable that captures the line number of the source code so that:
I do not have to keep going back and changing the hardcoded line number and better yet,
I do not have to hardcode the line number at all.
Welcome to StackOverflow! The answer to this is in the UniVerse BASIC User Guide V11.3.4:
https://docs.rocketsoftware.com/bundle/UniVerse_BASICUserGuide_V1134/resource/UniVerse_BASICUserGuide_V1134.pdf
Ref page 63 on Debugging Tools (RAID) and the M command to set watchpoints on variables.
A watchpoint condition occurs when RAID monitors a variable until the variable’s value changes. The
program then suspends operation and displays the variable’s old value, its new value, and the source
instruction that caused the change to occur
The command is entered at the :: prompt, within the debugger. You can enter the debugger with a DEBUG statement in your code or by breaking into it at runtime. You can also use the command RAID BP ProgName.
Another way to go about this is to compile with -X option so that you can get see where variables are referenced. See page 35 from above.
When I debug like this in BASIC, I tend to use names, not line numbers, to indicate what the code is doing, not where it is. So the code would look more like this:
147: DISPLAY "Initializing Beginning Date: ":OCONV(begdate,"D4-")
Now the line can move and you'll still be able to find it easily with the unique text. You can also use simpler unique text like this:
147: DISPLAY "BEGDATE_INIT: ":OCONV(begdate,"D4-")
Use whatever pattern seems comfortable.
Be sure begdate isn't EQUated to a dynamic element or some other variable. If, for example, EVENT<3> is equated to begdate the debugger tracing the specific variable name might not pick up on EVENT<3> or EVENT<Beginning_Date> being modified.
I am not aware of a specific #VAR or other runtime mechanism in UniVerse that will return the currently executing line number back to the BASIC code so that you can DISPLAY "Current line is ":#LINE.
In D3 I peeked into the local workspace and the current stack trace.
Someone with more current UniVerse expertise might be able to cite a specific function, #VAR, user exit, or other mechanism for this. It's possible that the feature you're looking for is only available in a later platform.
Rocket Support will help with this question : Support Agreement should not be necessary to ask a simple question like this. If that's not an option, check the forum on the Rocket site, or one of the community forums. I can provide links if required.

Sublime text multiple cursors?

Sublime Text is so damn advanced and this seems like such a stupid question, but...
I started writing a for loop in PHP (using SFTP), loved that it gave me a choice to auto-generate the loop. However, it enters this weird multi-cursor mode, which
1)I am not really sure how to use/exit without using the mouse;
2) it seems useless, seeing as all 3 type the same thing, even though I need to change, for example, the $i > x or $i = x.
Although Sublime does indeed support the idea of multiple cursors (which is an incredible time saver and useful as all get out, as we're about to see), what you're actually asking about here is a snippet which in this case happens to also include multiple cursors.
The general idea is that for code that you're likely to type many times (e.g. a for loop), you can create a snippet that will generate the bulk of the text for you in one shot, and then allow you to easily customize it as needed. In this case, the snippet in question is part of the default functionality of Sublime and is provided by the shipped PHP package.
To answer point #2 in your question first, this is far from useless. As seen here, I enter the text for and then press Tab to expand the snippet out. The first thing to notice here is that the status line says Field 1 of 4 to tell me that I'm in a snippet and that it contains four fields.
The first field is the name of the control variable for the loop, and all of them are selected so that as I change the name, all of them change at the same time because when there are multiple cursors, the text you type appears at all of them at the same time.
Once I'm done changing the name of the variable, I press Tab again to go to the next field, which allows me to easily change the point at which the loop starts. Another press of Tab takes me to the third field, where I can specify where the loop ends.
One last press of Tab exits the snippet and selects the text in the loop, so I can start writing my code (caveat: I am not a PHP developer).
At this point you can see Sublime offering another snippet for echo, which would expand out to an echo statement complete with quotes, then allow me to edit the text in the echo and skip to the end.
Circling back around to the first point in your question, you can use Esc at any point to jump out of a snippet and go back to regular editing. You can also use Tab or Shift+Tab to move through the fields in the snippet, and pressing Tab at the last field in the snippet exits it as well.
In this particular case, the first field in the snippet sets up multiple cursors, and so exiting the snippet while this field is active leaves multiple cursors in effect. You can jump back to a single cursor by pressing Esc one more time (this is true regardless of how you ended up with multiple cursors).

dialog/whiptail radiolist consistence

So basically I am trying to rewrite a bash script which uses dialog --radiolist for choosing locale,keyboard,time. At the moment the tag is a number that corresponds to a local (I created a hashtable for it). But because I have, and want to keep it that way for now, around 100 locales it gets messy at the end.
What I wanna achieve is to make it more compact without having to add or add an artificial, non visible item that might easily translate to its tag. (as a tag I would put the locale name)
What I have tried:
1. Noobish thing but I though that there might be some way to include empty like NULL in ASCII or 0, blank space etc, but dialog would always make it visible.
2. Exclude the item at all and finish on on/off but instead on/off takes place of item (not surprisingly if options are as follow --radiolist text height width list-height [ tag item status ])
3. Instead of letting the dialog on exit write to the output the name of the chosen locale I created an output statement myself.
I had red a lot about dialog and whiptail(http://linux.die.net/man/1/dialog, http://linuxcommand.org/lc3_adv_dialog.php) but always end up with having to add tag and an item. Would appreciate any suggestions and maybe some info if there is easily plug-gable dialog/whiptail compatible libs.
Thank You in advance
Perhaps you overlooked the --no-tags option (see manpage):
--no-tags
Some widgets (checklist, inputmenu, radiolist, menu) display a
list with two columns (a "tag" and "description"). The tag is
useful for scripting, but may not help the user. The --no-tags
option (from Xdialog) may be used to suppress the column of tags
from the display. Unlike the --no-items option, this does not
affect the data which is read from the script.
The question mentions whiptail and consistency, which could refer to consistency across dialog and whiptail. There is none, since
whiptail provides fewer options than dialog (inevitably, there will be differences, since there is no one-one mapping possible)
consistency as such between the two is done in dialog occasionally to help with compatibility (the reverse is not true).

Setting IIS 8 Application Pool to Restart Periodically, NOT Recycle

I'm hoping someone can answer my question because I've read the IIS.net article on this and I'm still confused. Basically, I want to set my website's application pool to restart every night at midnight. I've already set it to recycle periodically and that doesn't seem to fix the problem I intended it to fix...restarting manually does, however, and I would like it to restart every night.
I have gone to the IIS 8 Configuration Editor and I'm looking at the periodicRestart variable, but I don't know what values I'm supposed to put in the "schedule" or "time" fields. They have values of "(Count=0)" and "1.05:00:00", respectively, but I don't know what these are signifying or if they will even have the desired effect if I do, indeed, change them.
Please help, and thanks!
Put this in a .bat file and run as a scheduled task
iisreset [servername]

Automatically pass a value to a script menu for automation's sake in Bash/KSH

Trying to make a small script and cron job it in order to automate a task. Said script runs another script which has already been created, grabs the output, emails to specified recipients, and cleans up the output. I've got it almost down however am running into one major issue. The script that mine is running has a menu on the outset. That is to say, running the script by itself manually, i would have to select option 1 in order to get the output i want (the only other option, 2, is quit.)
How can I automatically enter (or simulate entering) the value 1 into the other script, so it does not hang when in a cron job waiting for user input?
Is there a sane way to do this?
Thanks in Advance.
You could try something as simple as using yes | command if answering yes is all that is needed. Otherwise you probably want to use expect to drive the imaginary keyboard for you.
http://expect.sourceforge.net/
Using autoexpect to record your session is a convenient way to come up with rough draft expect scripts as well.

Resources