From: Michael Prokop Date: Wed, 7 Feb 2007 07:48:37 +0000 (+0100) Subject: remove deprecated grml-bind X-Git-Tag: 0.9.14 X-Git-Url: http://git.grml.org/?p=grml-scripts.git;a=commitdiff_plain;h=b5ca240f9af61fbb724bf3cd480da97ec1d6f9ee remove deprecated grml-bind --- diff --git a/debian/changelog b/debian/changelog index ab90e3b..84e5f43 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grml-scripts (0.9.14) unstable; urgency=low + + * Remove grml-bind, it's deprecated nowadays. [Closes: issue104] + + -- Michael Prokop Wed, 7 Feb 2007 08:47:49 +0100 + grml-scripts (0.9.13) unstable; urgency=low * The 'fix bashism in several scripts' release. Thanks diff --git a/debian/rules b/debian/rules index cc42e84..f6d88a1 100755 --- a/debian/rules +++ b/debian/rules @@ -53,7 +53,7 @@ binary-arch: build install dh_testroot dh_installchangelogs dh_installdocs - dh_installman manpages/grml-scripts.1 manpages/grml-bind.8 manpages/reread_partition_table.8 manpages/gtf.1 manpages/random-hostname.1 \ + dh_installman manpages/grml-scripts.1 manpages/reread_partition_table.8 manpages/gtf.1 manpages/random-hostname.1 \ manpages/grml-setkeyboard.8 manpages/grml-setlang.8 manpages/getsf.1 manpages/grml-iptstate.8 manpages/qma.1 manpages/grml-swapon.8 \ manpages/grml2ram.8 manpages/gsuggest.1 # cp --no-dereference man/*.1.gz debian/grml-scripts/usr/share/man/man1/ @@ -85,7 +85,6 @@ binary-arch: build install /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/get_tw_cli.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grepc.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grepedit.1.gz \ - /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grml-bind.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grml-config.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grml-config-root.1.gz \ /usr/share/man/man1/grml-scripts.1.gz /usr/share/man/man1/grml-config-user.1.gz \ diff --git a/manpages/grml-bind.8 b/manpages/grml-bind.8 deleted file mode 100644 index ace8688..0000000 --- a/manpages/grml-bind.8 +++ /dev/null @@ -1,49 +0,0 @@ -.TH grml\-bind 8 "2005-05-29" "grml-bind" -.SH "NAME" -grml\-bind \- a program to prepare a file on a read-only filesystem for writing -.SH SYNOPSIS -.B grml\-bind -.RI [ OPTIONS ] " " -.SH DESCRIPTION -grml-bind is a program to prepare a file on a read-only filesystem for writing. -It copies the file to a ramdisk and mount --bind it back. -Very usefull for distributions like grml. -.SH OPTIONS -.TP -.B \-h -Show summary of options. -.TP -.B \-c -Create the file-mapping -.TP -.B \-r -Remove the file-mapping -.TP -.B \-v -Verbose (show what is going on) -.TP -.B \<> -If no Option is given, -c (create) is assumed -.SH EXAMPLES -.TP -.B grml-bind -c /etc/inputrc -The file /etc/inputrc will be copied to /ramdisk/grml-bind/inputrc and mounted back with --bind -.TP -.B grml-bind -r /etc/inputrc -If you already unlocked /etc/inputrc (with grml-bind -c /etc/inputrc), then the mount will be removed and rm -r /ramdisk/grml-bind/inputrc will be executed -.TP -.B grml-bind -c /etc/vim -Now you can edit your vim configuration. -.TP -.B grml-bind -rc /etc/vim -To see what's going on -.SH BUGS/LIMITATIONS -.TP -.B no hardlinks -grml-bind can not work with hardlinks because grml-bind copies the files to another filesystem. -So hardlinks do not work. -.TP -.B only one mapping with the same name -grml-bind /a/b && grml-bind /c/b (will not work) -.SH AUTHOR -This manual page was written by the grml-team. http://grml.org/ (c)Michael Gebetsroither diff --git a/usr_bin/grml-bind b/usr_bin/grml-bind deleted file mode 100755 index d3a8d8f..0000000 --- a/usr_bin/grml-bind +++ /dev/null @@ -1,156 +0,0 @@ -#!/bin/sh -# Filename: grml-bind -# Purpose: Program to copy config files and mount them back for editing -# Authors: grml-team (grml.org), (c) Michael Gebetsroither -# Bug-Reports: see http://grml.org/bugs/ -# License: This file is licensed under the GPL v2. -# Latest change: Thu Feb 10 06:25:01 CET 2005 [gebi] -################################################################################ - - -### -### __INCLUDES -### -. /etc/grml/sh-lib -#. /etc/grml/sysexits-sh - - - -### -### __VARIABLES -### - -# real vars (script defaults) -target_="/ramdisk/grml-bind" -runsFromHd && target_="/tmp/grml-bind" # where to save the file -file_ro_="" # secured input filename (source) -target_path_="" #secured path to target + filename - -# command parameter vars -verbose_=0 -remove_mapping_=0 # user wants to remove the mapping -create_mapping=0 # user wants to create the mapping - - - -### -### __FUNCTIONS -### - -# print program usage -function printUsage -{ -cat << EOF -Usage: "grml-bind" [OPTIONS] - -grml-bind is a program to prepare a file on a read-only fs for writing -It copies the file to a ramdisk and mount --bind it back. -Very usefull for knoppix-like distributions. - -OPTIONS: - -c create the file-mapping - -r remove the file-mapping - -v verbose (show what is going on, v++) - -h this help text - () create the file-mapping - -EOF -} - - -# function to create the mapping -function createMapping -{ - isExistent "$file_ro_" die - isNotExistent "$target_path_" die - - # --preserve=mode,ownership,timestamps can be a problem for normal user - # but neverless mount --bind requires extended privilegs, so who cares? - execute "cp -rL \"$file_ro_\" \"$target_\"" warn \ - "Problms copying data to ramdisk" - - # mount--bind the file from ramdisk back over the r/o file - execute "mount --bind \"$target_path_\" \"$file_ro_\"" warn || \ - execute "rm -r \"$target_path_\"" die - - exit 0 -} - - -# remove the mapping -function removeMapping -{ - isExistent "$target_path_" die \ - "You have not edited this file yet: \"$target_path_\"" - - execute "umount \"$file_ro_\"" warn - execute "rm -r \"$target_path_\"" die - - exit 0 -} - - -### -### __START -### - -# parse commandline -while getopts vrhc opt_ ; do - case "$opt_" in - r) remove_mapping_=1 ;; - c) create_mapping=1 ;; - h) printUsage; exit ;; - v) let verbose_=$verbose_+1 ;; - ?) printUsage; exit 64 ;; - esac -done -shift $(($OPTIND - 1)) # set ARGV to the first not parsed commandline parameter -setVerbose $verbose_ - - -### -# Working part -### - -setExitFunction "printUsage" -# hmmm user has not given us a filename/path -if [ -z "$1" ]; then - die "you need to give me a file/path" 64 -fi - -# hmmm user gave us the wrong number of arguments -if [ "$#" -ne 1 ]; then - die "wrong number of arguments" 64 -fi -resetExitFunction - -checkRoot die - -# does our target-path exist? if not create it -if [ ! -d $target_ ]; then - warn "target path \"$target_\" does not exist => creating" - execute "mkdir -p $target_" die - runsFromHd && execute "chmod 751 $target_" die -fi - -# secure the input file/path -file_ro_=`secureInput "$1"` - -# check if input file is a link, if yes resolve it -if [ -L $file_ro_ ]; then - file_ro_=`execute "readlink \"$file_ro_\""` -fi - -#create all possible pathformats to absolut paths -normalized_source_path_=`relToAbs "$file_ro_"` -file_ro_=$normalized_source_path_ -target_path_=$target_/`execute "basename \"$normalized_source_path_\""` - -# do what the user wants, maybee *g* -if [ $remove_mapping_ -eq 1 ]; then # ok, the user wants to remove his mapping - removeMapping -else # no, user wants to create the mapping - createMapping -fi - -# END OF FILE ################################################################################