03-31-2008
There's also another possibility, though I would not recommend it.
chgrp reboot command to a "reboot group", SETUID reboot command (chmod 4750), and add those "reboot allowed users" to that "reboot group".
Take into account that:
1- This is very dangerous, so consider using what sysgage suggests first.
2- reboot must be a binary file.
Regards.
10 More Discussions You Might Find Interesting
1. Programming
Hi guys,
I am designing the rdbms in C/C++ on linux platform as my project.
Can any one help me in designing menu driven screen (like the pine ) which will print on screen as follows
1) create table
2) add table
............. etc
with arrow keys for... (2 Replies)
Discussion started by: amit
2 Replies
2. UNIX for Advanced & Expert Users
Hi Guys,
I would like to know how to write Menu driven programs
using ksh.
I have several script files 1.sh 2.sh 3.sh ...so on 25 files
I want to create a Menu which will calls submenus.
Main Menu
1. Data Entry
if you press 1 again submenu 1. Order entry
... (3 Replies)
Discussion started by: krishna
3 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1) Write a Menu Driven Shell Script which accepts1 to 5 options and performs the following actions for... (1 Reply)
Discussion started by: vaghya
1 Replies
4. Shell Programming and Scripting
Hi Guys..
am new to unix scrpiting..I need a Menu need to create using shell scrpting
eg:
Food items
ready
paid
if i press "f" need to add items for a file food items..
if i press "r" it need to move into ready and remove from food items
if i press "p" need to update a filed in... (1 Reply)
Discussion started by: sasdua
1 Replies
5. UNIX for Dummies Questions & Answers
i'm confused what this means.
i was asked to design a menu or command line option driven script that reads out of a DB and displays info such as
read_data.pl -u <user> -e <event>
which would print commands run by <user>with the <event> in the db.
any suggestions? i've been using... (2 Replies)
Discussion started by: kpddong
2 Replies
6. Shell Programming and Scripting
Hi, I was wondering if someone could help me write a shell script in Linux that backsup/restores data to anywhere I choose but it needs to be menu driven?
Thanks, I'm new to Linux/Unix but liking it so far...just hoping to get to grips with the scripts! :) (7 Replies)
Discussion started by: Nicole
7 Replies
7. Shell Programming and Scripting
I'm a beginner at scripting and have been putting this script together over the past week. It's no where as polish as it could be. Any tips/suggestions on improving this script would be appreciate it. Every week, my team develops WAR files in tomcat on our test environment and moves them to our... (4 Replies)
Discussion started by: bouncer
4 Replies
8. Shell Programming and Scripting
My employers would like me to selectively run one of several different (already-existing) Korn Shell menu-driven scripts out of the user's .profile file, depending on some yet-to-be-specified user critieria.
I've never done this kind of thing, but I have the existing scripts (among other... (5 Replies)
Discussion started by: Clovis_Sangrail
5 Replies
9. UNIX for Dummies Questions & Answers
I need to write a shell script that allows some system-administration tasks to be preformed automatically from a menu-driven interface. Automate the following tasks:
• Copy directory tree
• Delete files or directories
• Output Information
But I don't understand the question. What is a "menu... (2 Replies)
Discussion started by: femchi
2 Replies
10. Shell Programming and Scripting
Hi Team ,
I wrote a shell script for adding and subtracting two numbers am getting error could some one please help to fix it
script:
echo "Enter 1 to add:"
echo "Enter 2 to sub:"
echo "Enter 3 for both addition and subtraction :"
read ans;
case "$ans" in
1)... (4 Replies)
Discussion started by: knz
4 Replies
LEARN ABOUT CENTOS
tk::menu::item
Menu::Item(3) User Contributed Perl Documentation Menu::Item(3)
NAME
Tk::Menu::Item - Base class for Menu items
SYNOPSIS
require Tk::Menu::Item;
my $but = $menu->Button(...);
$but->configure(...);
my $what = $but->cget();
package Whatever;
require Tk::Menu::Item;
@ISA = qw(Tk::Menu::Item);
sub PreInit
{
my ($class,$menu,$info) = @_;
$info->{'-xxxxx'} = ...
my $y = delete $info->{'-yyyy'};
}
DESCRIPTION
Tk::Menu::Item is the base class from which Tk::Menu::Button, Tk::Menu::Cascade, Tk::Menu::Radiobutton and Tk::Menu::Checkbutton are
derived. There is also a Tk::Menu::Separator.
Constructors are declared so that $menu->Button(...) etc. do what you would expect.
The "-label" option is pre-processed allowing ~ to be prefixed to the character to derive a "-underline" value. Thus
$menu->Button(-label => 'Goto ~Home',...)
is equivalent to
$menu->Button(-label => 'Goto Home', -underline => 6, ...)
The "Cascade" menu item creates a sub-menu and accepts these options:
-menuitems
A list of items for the sub-menu. Within this list (which is also accepted by Menu and Menubutton) the first two elements of each item
should be the "constructor" name and the label:
-menuitems => [
[Button => '~Quit', -command => [destroy => $mw]],
[Checkbutton => '~Oil', -variable => $oil],
]
-postcommand
A callback to be invoked before posting the menu.
-tearoff
Specifies whether sub-menu can be torn-off or not.
-menuvar
Scalar reference that will be set to the newly-created sub-menu.
The returned object is currently a blessed reference to an array of two items: the containing Menu and the 'label'. Methods "configure"
and "cget" are mapped onto underlying "entryconfigure" and "entrycget".
The main purpose of the OO interface is to allow derived item classes to be defined which pre-set the options used to create a more basic
item.
BUGS
This OO interface is very new. Using the label as the "key" is a problem for separaror items which don't have one. The alternative would be
to use an index into the menu but that is a problem if items are deleted (or inserted other than at the end).
There should probably be a PostInit entry point too, or a more widget like defered 'configure'.
perl v5.16.3 2014-06-10 Menu::Item(3)