[Solved]How to remove this warning message

Archived topics about LMDE 1 and LMDE 2
Locked
manmath

[Solved]How to remove this warning message

Post by manmath »

Hi All, thanks for the godsend LMDE. Please guide me how can I disable the warning message (see the bold text) during installation/upgradation.

apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
console-setup keyboard-configuration
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 891 kB of archives.
After this operation, 77.8 kB disk space will be freed.
Do you want to continue [Y/n]? y
Get:1 http://ftp.debian.org/debian/ squeeze/main keyboard-configuration all 1.58 [255 kB]
Get:2 http://ftp.debian.org/debian/ squeeze/main console-setup all 1.58 [636 kB]
Fetched 891 kB in 1min 13s (12.2 kB/s)
Reading changelogs... Done
Preconfiguring packages ...
(Reading database ... 84588 files and directories currently installed.)
Preparing to replace keyboard-configuration 1.57 (using .../keyboard-configuration_1.58_all.deb) ...
Unpacking replacement keyboard-configuration ...
Preparing to replace console-setup 1.57 (using .../console-setup_1.58_all.deb) ...
Unpacking replacement console-setup ...
Processing triggers for man-db ...
Setting up keyboard-configuration (1.58) ...
insserv: warning: script 'K01mintsystem' missing LSB tags and overrides
insserv: warning: script 'mintsystem' missing LSB tags and overrides
insserv: warning: script 'K01mintsystem' missing LSB tags and overrides
insserv: warning: script 'mintsystem' missing LSB tags and overrides

Setting up console-setup (1.58) ...
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB

Total disk space freed by localepurge: 0 KiB
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Leit

Re: How to remove this warning message

Post by Leit »

one of your /etc/init.d/ scripts isn't LSB conformable.
every script should have a "header" like:

Code: Select all

#! /bin/sh

### BEGIN INIT INFO
# Provides:      servicename
# Required-Start:   $servicename $servicename //Means the services which has to be startet before running the script
# Required-Stop:   $servicename $servicename //Means the services which has to be stopped before stopping the script ... should be the same as in "Required-Start"
# Default-Start:   2 3 4 5 //runlevels where the script should run
# Default-Stop:      1    //runlevels where the script shouldn't run
# Short-Description:   enter text like you want // a description of the Daemon... you're free to write in what you want
### END INIT INFO

you should delete everything after "//" and even the "//" if you're using this "template".

~ Leit

EDIT: but normaly it's only a warning and nothing you should REALLY worry about.
manmath

[Solved] How to remove this warning message

Post by manmath »

Followed you instruction and changed the header of mintsystem in /etc/init.d. That solved the problem.. Now no more warning message in upgrading/installing.
Thanks Leiton!
Leit

Re: How to remove this warning message

Post by Leit »

Leiton? :lol:

no problem... would be nice if you could add something like [solved] to the topic of your thread, so that others can see that the problem is solved.

greetings, Leit
mads

Re: How to remove this warning message

Post by mads »

Leit wrote:one of your /etc/init.d/ scripts isn't LSB conformable.
every script should have a "header" like:

Code: Select all

#! /bin/sh

...
Sorry, should the header be changed to "#! /bin/sh" or "#!/bin/sh"?
Thanks
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

#! /bin/sh is equivalent to #!/bin/sh

#!/bin/sh is the classic method but as long as the whitespace is only between #! and /bin/* it doesnt matter on "modern" systems

tryed with a testscript:

Code: Select all

#!/bin/sh
echo test
output: test

Code: Select all

#! /bin/sh
echo test

output: test

Code: Select all

#!/bin/blub
echo test

output: bash: ./test: /bin/blub: Defekter Interpreter: No such file or directory

Code: Select all

#! /bin/blub
echo test

output: bash: ./test: /bin/blub: Defekter Interpreter: No such file or directory

greetings,

Leit
Last edited by Leit on Fri Nov 26, 2010 8:49 pm, edited 1 time in total.
mads

Re: [Solved]How to remove this warning message

Post by mads »

Leit wrote:#! /bin/sh is equivalent to #!/bin/sh

#!/bin/sh is the classic method but as long as the whitespace is only between #! and /bin/* it doesnt matter on "modern" systems
Leit, thank you so much for your reply.

I asked this question because like the OP, I also got the error messages: "insserv: warning: script 'mintsystem' missing LSB tags and overrides", when running "apt-get dist-upgrade" command. Then I saw this thread and changed the header in /etc/init.d/mintsystem file from "#!/bin/bash" to "#! /bin/sh".
But it didn't stop the error messages. Yesterday, I decided to change the header again, this time to "#!/bin/sh". I will wait a week to see if those errors happen again or not. Either way, I will write a new post about it.
indaymadel

Re: [Solved]How to remove this warning message

Post by indaymadel »

Which one should I edit? What file?
Leit

Re: [Solved] How to remove this warning message

Post by Leit »

@indaymadel:
you should read manmaths post:
manmath wrote:Followed you instruction and changed the header of mintsystem in /etc/init.d. That solved the problem.. Now no more warning message in upgrading/installing.
Thanks Leiton!
/etc/init.d/mintsystem

@Mads: no problem, but you have to mind, that my "scriptheader" is only a template, you have to add the right files/programs, the best way would be to ask manmath, what he exactly wrote in his mintsystemscript, cause on his PC it seems to work :lol:

greetings,

Leit
mads

Re: [Solved] How to remove this warning message

Post by mads »

Leit wrote: @Mads: no problem, but you have to mind, that my "scriptheader" is only a template, you have to add the right files/programs, the best way would be to ask manmath, what he exactly wrote in his mintsystemscript, cause on his PC it seems to work :lol:
Yes, you are right Leit. I wish manmath would write a brand new step to step How To about it. I mean it. :lol:
In the mean time. I will not focus too much on it. Like you said: "...but normaly it's only a warning and nothing you should REALLY worry about."
And thank you for writing "REALLY" and not "really". it made me feel MUCH better. :lol:
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

thank you :D :lol:

the problem is... the most people ain't got this message... I ain't got it in LM 7 Main, LM 8 KDE (I've never used the Main version of LM 8 ), LM 9 Main and LM 9 KDE and i even ain't got it on LM10 (always x64), so you ain't have to worry about this message but about the system itself.. something has went wrong if you get such a message, could be a program you installed or a configuration you made... or the whole installation has a failure (which I aint expect).

sorry for destroying you're good feeling :lol: , but i've wanted to give you that hint.
but just like i said, i think it's simply a configuration problem caused by some program, and home-PC's ain't need to be LSB-conformable, but if you're working on a firm with linux and got secure configurated PC's you shouldn't be able to execute script without a LSB-Header.

greeting,

~Leit

and now i'm going to sleep...
Last edited by Leit on Tue Nov 30, 2010 4:53 am, edited 1 time in total.
mads

Re: [Solved]How to remove this warning message

Post by mads »

Leit wrote:.. something has went wrong if you get such a message, could be a program you installed or a configuration you made... or the whole installation has a failure (which I aint expect).
In the absence of a solution to this issue (manmath, where are you?), I edited /etc/init.d/mintsystem script and replaced the original lines

Code: Select all

#!/bin/bash

/usr/lib/linuxmint/mintSystem/mint-adjust.py
with this (SOURCE: https://bugs.launchpad.net/linuxmint/+bug/681238):

Code: Select all

#!/bin/sh -e

### BEGIN INIT INFO
# Provides: mintsystem
# Required-Start: mountkernfs $local_fs
# Required-Stop: $local_fs
# Should-Start:
# Should-Stop:
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Start Various mint services.
### END INIT INFO

/usr/lib/linuxmint/mintSystem/mint-adjust.py
And finally ran

Code: Select all

sudo dpkg-reconfigure sysv-rc
with success

Code: Select all

info: Checking if it is safe to convert to dependency based boot.
info: Reordering boot system, log to /var/lib/insserv/run-20101129T2009.log
success: Enabled dependency based boot system.
Leit, could you please explain a little bit more what this code is/does?
Is there anybody who could confirm this? Or has a better solution. Thanks.
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

you mean:

Code: Select all

#!/bin/sh -e

### BEGIN INIT INFO
# Provides: mintsystem
# Required-Start: mountkernfs $local_fs
# Required-Stop: $local_fs
# Should-Start:
# Should-Stop:
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Start Various mint services.
### END INIT INFO
?

your script says:
it Provides Mintsystem (how hard to find out :lol:)
to start it requires the local filesystem.. I aint know whats mountkernfs, but I would say it means, that the kernel must be startet
it stops when the local filesystem is unmounted.
it doesn't wishes any programs started or stopped.
Default start... I see this "S" argument for the first times, I think it means all normal runmodes 1-5
Stops on shutdown or Reboot.
Short Description is selfexplaining.
mads

Re: [Solved]How to remove this warning message

Post by mads »

Thank you so much. :D

What about the header "#!/bin/sh -e", compared to "#!/bin/sh"?
Thanks.
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

#!/bin/sh is the interpreter, also it could be #!/bin/bash or #!/bin/tsh or something else, but sh is the normal linuxshell.
-e stands for errexit, it means the script to stop when an error occurs.
mads

Re: [Solved]How to remove this warning message

Post by mads »

Leit wrote:#!/bin/sh is the interpreter, also it could be #!/bin/bash or #!/bin/tsh or something else, but sh is the normal linuxshell.
Thanks. The person who had posted this workaround, had also dropped a little comment about this:
"line 1 used to be #!/bin/bash, but this script runs perfectly also with dash ..."
Leit wrote:-e stands for errexit, it means the script to stop when an error occurs.
Thank you sir. :D
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

no problem^^
Leit

Re: [Solved]How to remove this warning message

Post by Leit »

before I forget, in /etc/init.d/skeleton you can find a really good commented init-script-template.

greetings,

~ Leit
Locked

Return to “LMDE Archive”