2 # ComeOn Point Functions! v0.9.2
3 # - usate da vari altri moduli ComeOn Point...
5 # AUTHOR: Beppe (beppe.dem@nsm.it)
7 # This program is free software; you can redistribute it and/or
8 # modify it under the terms of the GNU General Public License
9 # as published by the Free Software Foundation; either version 2
10 # of the License, or (at your option) any later version.
12 # This program is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with this program; if not, write to the Free Software
19 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
29 # Returns $PKG_TO_REMOVE
30 find_incompatible_packages() {
31 dialog --backtitle "$TITLE" --infobox "Vediamo innanzitutto se c'e' qualche pacchetto di troppo ... ;-)" 0 0
34 for i in sendmail smailcfg cnews
36 if [ -f /var/adm/packages/$i ]
38 PKG_TO_REMOVE="$PKG_TO_REMOVE $i"
43 # Returns $PKG_TO_INSTALL
44 find_necessary_packages() {
45 dialog --backtitle "$TITLE" --infobox "Controlliamo se manca qualche pacchetto..." 0 0
48 for i in tcpip mailx inn
50 if [ ! -f /var/adm/packages/$i ]
52 PKG_TO_INSTALL="$PKG_TO_INSTALL $i"
59 dialog --backtitle "$TITLE" --infobox "Configuro trn all'user $1..." 0 0
61 SHELL_USED="`basename \`cut /etc/passwd -f1,7 -d: | grep $1: | cut -f2 -d:\``"
62 USER_HOME="`cut /etc/passwd -f1,6 -d: | grep $1: | cut -f2 -d:`"
63 TRNRC="$USER_HOME/.trnrc"
67 if [ -f $USER_HOME/.bash_profile ]
69 PROF=$USER_HOME/.bash_profile
71 PROF=$USER_HOME/.profile
74 PROF=$USER_HOME/.zprofile;;
76 PROF=$USER_HOME/.profile;;
83 elif [ ! "`grep -x \". ~/.trnrc\" $PROF`" ]
85 echo -e "\n. ~/.trnrc" >>$PROF
90 echo "EDITOR=\"$2\"" > $TRNRC
91 cat copi.trnrc >> $TRNRC
100 dialog --backtitle "$TITLE" --infobox "Configuro elm all'user $USER..." 0 0
102 USER_HOME="`cut /etc/passwd -f1,6 -d: | grep $USER: | cut -f2 -d:`"
103 DIRRC="$USER_HOME/.elm"
106 mkdir -p $DIRRC -m 700
107 chown $USER.mail $USERHOME $DIRRC
113 # .elm/elmrc - options file for the ELM mail system
115 # Generated by $PKTNAME for $USER
118 # For yes/no settings with ?, ON means yes, OFF means no
120 # how to sort the alias list, "Name" by default
121 ### aliassortby = Name
123 # name of editor to use for replies that have text
126 # alternative addresses that I could receive mail from (usually a
127 # forwarding mailbox) and don't want to have listed...
130 # should the default be to delete messages we've marked for deletion?
133 # should the default be to keep unread messages in the incoming mailbox?
136 # should the default be to store read messages to the "received" folder?
139 # should we use the "->" rather than the inverse video bar?
142 # should the message disposition questions be displayed(ON) or
143 # auto-answered(OFF) with the default answers when we resync or
147 # would you like to be asked for Carbon-Copies information each msg?
150 # attribution string for replies ('%s' is the author of original message)
151 attribution = %s wrote:
153 # automatically copy message being replied to into buffer?
156 # threshold for bouncing copies of remote uucp messages...
157 # zero = disable function.
160 # This is used to determine if the builtin pager should be used on some
161 # messages even if you would usually use an external pager program.
162 # There are two ways of determining whether the builtin pager should be
163 # used. If you want any message that is shorter than "n" lines to use the
164 # internal pager, set the parameter to "n". If you want the builtin
165 # pager to be used if the message is "m" lines shorter than the number of
166 # lines on your screen set the parameter to be "-m". Setting the
167 # parameter to zero will result in the message always being sent through
168 # your external pager.
169 ### builtinlines = -3
171 # where to save calendar entries
172 #calendar = /root/calendar
174 # list of options that can be configured at the "o)ptions" screen
175 configoptions = ^_cdefsopyv_am_un
177 # Should elm always ask the user to confirm before it appends
178 # messages to any existing file?
179 # This is used for both folders in the user's mail directory
180 # and ordinary files.
183 # Should elm always ask the user to confirm before it creates
185 # This is used for both folders in the user's mail directory
186 # and ordinary files.
189 # Should elm ask for confirmation before it appends a message
190 # to an existing file that is not a folder in the user's Mail
192 # This is used for ordinary files only and does not affect
193 # folders in the user's mail directory.
196 # Should elm ask for confirmation before it creates a new folder
197 # in the user's Mail directory?
198 # This is used only for folders in the user's mail directory and
199 # does not affect ordinary files.
202 # save a copy of all outbound messages?
205 # name of editor for ~e command (when editor="builtin")
208 # what editor to use ("none" means simulate Berkeley Mail)
211 # the character to use in the builtin editor for entering commands
214 # save outbound messages by login name of sender/recipient even if the
215 # associated folder doesn't already exist?
218 # do we want to be able to mail out AT&T Mail Forms?
221 # The full user name for outbound mail
222 ### fullname = $PKTNAME User
224 # should we keep folders from which all messages are deleted?
227 # are we running on an HP terminal and want HOME, PREV, NEXT, etc...?
230 # local ".signature" file to append to appropriate messages...
231 localsignature = ~/.signature
233 # where to save my mail to, default directory is "Mail"
236 # should we display the three-line 'mini' menu?
239 # would you like a copy of a message you send to an alias you are on?
242 # when using the page commands (+ - <NEXT> <PREV>) change the current
243 # message pointer...?
246 # just show the names when expanding aliases?
249 # when messages are copied into the outbound buffer, don't include headers?
252 # program to use for displaying messages ('builtin' is recommended)
255 # start up by pointing to the first new message received, if possible?
258 # list of delivery precedences allowed, or empty to allow anything
259 # precedence may be followed by optional ":priority" specification
262 # prefix sequence for indenting included message text in outgoing messages...
265 # how to print a message ('%s' is the filename)
266 ### print = /bin/cat %s | /usr/bin/lpr
268 # prompt for a command after the external pager exits?
271 # Value by which message count is incremented while reading a new mailbox.
272 # Setting this value to a number larger than one will speed up the time it
273 # takes to read a large mailbox when using a slow terminal.
276 # where to save received messages to, default file is "=received"
277 receivedmail = =received
279 # remote ".signature" file to append to appropriate messages...
280 remotesignature = ~/.signature
282 # emulate the mailx message increment mode (only increment after
283 # something has been 'done' to a message, either saved or deleted,
284 # as opposed to simply each time something is touched)?
287 # save messages, incoming and outbound, by login name of sender/recipient?
290 # where to save copies of outgoing mail to, default file is "=sent"
293 # The shell to use for shell escapes
296 # do we want dashes above signatures? (News 2.11 compatibility and convention)
299 # time in seconds which Elm will wait after displaying a transient message
300 # and before erasing it. Can be 0 or positive integer.
303 # are we running on an HP terminal and want softkeys available too?
304 # (this implies "keypad=ON" too)
307 # how to sort folders, "Reverse Sent" by default
308 ### sortby = Reverse-Sent
310 # Set the main prompt timeout for resynching...
313 # display message title when displaying pages of message?
316 # where to place temporary files, default directory is "/tmp"
319 # are we good at it? 0=beginner, 1=intermediate, 2+ = expert!
322 # would you like to use termcap/terminfo ti/te entries?
325 # name of editor for ~v command (when editor="builtin")
328 # enable the weedout list to be read?
331 # what headers I DON'T want to see, ever.
332 weedout = "*end-of-user-headers*"
337 chown $USER.mail $ELMRC