summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2009-10-16 12:51:21 +0200
committerDaniel Friesel <derf@derf.homelinux.org>2009-10-16 12:51:21 +0200
commite2707f4d9fe6f792427fb08cfdc58354f29de5b0 (patch)
tree17f4c6d7331b5c5cc7dbdbb7213fc36f773fce98 /etc
parentf47fe4813e0fa7fbc1f034fd7f64229a949fbdb6 (diff)
off: Remove [place] argument, I don't use it anyway
Diffstat (limited to 'etc')
-rw-r--r--etc/completions/_off13
-rw-r--r--etc/functions/off18
2 files changed, 1 insertions, 30 deletions
diff --git a/etc/completions/_off b/etc/completions/_off
deleted file mode 100644
index 1d61f8f..0000000
--- a/etc/completions/_off
+++ /dev/null
@@ -1,13 +0,0 @@
-#compdef off
-
-typeset -a arguments
-typeset expl
-
-arguments=(
- '--force[shutdown a server]'
- '-n[simulate]'
- '-r[reboot]'
- ':place:_derf_place'
-)
-
-_arguments -s $arguments
diff --git a/etc/functions/off b/etc/functions/off
index 12997f4..53f9343 100644
--- a/etc/functions/off
+++ b/etc/functions/off
@@ -9,7 +9,6 @@ typeset filesystem garbage file
typeset -a filesystems
typeset tune2fs
typeset -i force reboot simulate exit_ok=1
-typeset gone
function execute {
if (( simulate )) {
@@ -26,15 +25,12 @@ while [[ $1 == -* ]] {
--force) force=1 ;;
-h)
print 'off - shutdown / restart the system'
- print 'Usage: off [--force] [-hnr] [place]'
+ print 'Usage: off [--force] [-hnr]'
print 'Options:\n'
print ' -n simulate. Do not actually shutdown'
print ' -r reboot'
print ' -h show this message'
print '\--force shutdown even if the machine is a server'
- print ''
- print ' place supply if machine will remain off for some time,'
- print ' either "gone" or the place one will be going to'
return 0
;;
-|--) shift; break ;;
@@ -43,8 +39,6 @@ while [[ $1 == -* ]] {
shift
}
-gone=$1
-
# Don't shut down a server too easily
if [[ $force != 1 && $hosts[$HOST] == *:server:* ]] {
warn "This seems to be a server... not shutting down"
@@ -52,16 +46,6 @@ if [[ $force != 1 && $hosts[$HOST] == *:server:* ]] {
return 1
}
-if [[ -n $gone ]] {
- for file in ~/packages/leave.d/etc/{_any,$gone}/*(N); {
- if [[ ${file:e} == zsh ]] {
- execute source $file
- } else {
- execute $file
- }
- }
-}
-
if pgrep -x amarokapp &> /dev/null; then
execute dcop amarok MainApplication-Interface quit
fi