agents4jesus | 30 Jun 23:00 2015
Picon

USB Booting problems

Hi Everyone,

I recently tried installing Ubuntu 15.04 onto a USB 3.0 flash drive. The reason for this was to be able to keep the current OS on the HD, but still be able to run Ubuntu without dual booting and partitioning the HD, and without much speed loss.

Instead of burning a dvd, I used Pen Drive Linux’s Universal USB Installer, and put it on one of my 32GB USB 2.0 drives. Then I booted from that and partitioned my 3.0 drive and installed it there.

Well, it said that it was complete and so I rebooted. Of course, I had to F12 and select boot device. So it started up but then said it encountered some problems and dropped to ash.


I redid this, guessing that the install misfired, but it did the same thing.

So I booted up into my original OS on my HD (yes, Windows) and redownloaded the Universal USB Installer and also downloaded the 64-bit 15.04 (I was using 32 bit earlier).

So I redid all of that.

The first boot of the 3.0 looked fine, so I shut it down. A couple days later I booted it up and it did the same thing: It dropped down to ash.
Here is the error spew for this time around:
==========================================
[          0.632437] ACPI PCC probe failed.
starting version 219
[          11.543738] usb 2-1: device not accepting address 2, error -62
Gave up waiting for root device. Common problems:
- Boot args (cat /proc/cmdline)
  - Check rootdelay= (did the system wait long enough?)
  - Check root= (did the system wait for the right device?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/disk/by-uuid/a70031e8-eb1c-4620-8075-568746c1865a does not exist
Dropping to a shell!

BusyBox v1.22.1 (Ubuntu 1:1.22.0-9ubuntu1) built-in shell (ash)
Enter 'help' for a list of built-in commands

(initramfs)
==========================================

Any suggestions on how to get this to work?

Oh, and I partitioned the 32GB drive like this: 28GB of ext4 and the rest as swap.

Maybe I partitioned it wrong…could anyone show me how to partition correctly (that and setting mount points and such)…

Thanks,

Tony

<div>
<div data-externalstyle="false" dir="ltr">

<div>Hi Everyone,</div>
<div><br></div>
<div>I recently tried installing Ubuntu 15.04 onto a USB 3.0 flash drive. The reason for this was to be able to keep the current OS on the HD, but still be able to run Ubuntu without dual booting and partitioning the HD, and without much speed loss.</div>
<div><br></div>
<div>Instead of burning a dvd, I used Pen Drive Linux&rsquo;s Universal USB Installer, and put it on one of my 32GB USB 2.0 drives. Then I booted from that and partitioned my 3.0 drive and installed it there.</div>
<div><br></div>
<div>Well, it said that it was complete and so I rebooted. Of course, I had to F12 and select boot device. So it started up but then said it encountered some problems and dropped to ash. </div>
<div><br></div>
<div><br></div>
<div>I redid this, guessing that the install misfired, but it did the same thing. </div>
<div><br></div>
<div>So I booted up into my original OS on my HD (yes, Windows) and redownloaded the Universal USB Installer and also downloaded the 64-bit 15.04 (I was using 32 bit earlier).</div>
<div><br></div>
<div>So I redid all of that.</div>
<div><br></div>
<div>The first boot of the 3.0 looked fine, so I shut it down. A couple days later I booted it up and it did the same thing: It dropped down to ash. </div>
<div>Here is the error spew for this time around:</div>
<div>==========================================<br>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0.632437] ACPI PCC probe failed.<br>starting version 219<br>[&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 11.543738] usb 2-1: device not accepting address 2, error -62<br>Gave up waiting for root device. Common problems:<br>- Boot args (cat /proc/cmdline)<br>&nbsp; - Check rootdelay= (did the system wait long enough?)<br>&nbsp; - Check root= (did the system wait for the right device?)<br>- Missing modules (cat /proc/modules; ls /dev)<br>ALERT! /dev/disk/by-uuid/a70031e8-eb1c-4620-8075-568746c1865a does not exist<br>Dropping to a shell!</div>
<div><br></div>
<div>BusyBox v1.22.1 (Ubuntu 1:1.22.0-9ubuntu1) built-in shell (ash)<br>Enter 'help' for a list of built-in commands</div>
<div><br></div>
<div>(initramfs)</div>
<div dir="ltr">==========================================<br>
</div>
<div><br></div>
<div>Any suggestions on how to get this to work?</div>
<div><br></div>
<div>Oh, and I partitioned the 32GB drive like this: 28GB of ext4 and the rest as swap. </div>
<div><br></div>
<div>Maybe I partitioned it wrong&hellip;could anyone show me how to partition correctly (that and setting mount points and such)&hellip;</div>
<div><br></div>
<div>Thanks,</div>
<div><br></div>
<div>Tony<br>
</div>
<div data-signatureblock="true"><br></div>

</div>
</div>
robert rottermann | 30 Jun 17:07 2015

using clonezilla or partclone from the commandline to create a "sparse" img file

Hi there,

I would like to copy the contents of an sd-card that contains two 
partitions (actually a raspberry boot and data partition) into a file 
that later can be used to copy to an other sd-card .

using a python script, this works well when I just open the device 
pointing to the sd-card (like /dev/sdc) as a file, and the copy its 
content to a disk file.
to restore it, I copy that disk file to the device again.

However, this approach has  big disadvantages:
my disk file is exactly as big as the the sd-cards capacity.
And, worse, to copy it back again, I need a sd-card with the same 
capacity as the original one.

I hope to find tools that would allow me to create such "sparse" copies.
It looks, as if partclone is such a tool.
Unfortunately I found no description how it could be used from the 
command line.

can sombody of you point me to such a documentation/tutorial,
or better yet: tell me what is the right way to dump an sd card into an 
img file.
I know dd, ..

thanks
robert

Scott Ehrlich | 30 Jun 15:20 2015

Re: ubuntu-users Digest, Vol 130, Issue 60

iPhone answer below - topic 1.

On Tue, Jun 30, 2015 at 8:00 AM,  <ubuntu-users-request <at> lists.ubuntu.com> wrote:
> Send ubuntu-users mailing list submissions to
>         ubuntu-users <at> lists.ubuntu.com
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
> or, via email, send a message with subject or body 'help' to
>         ubuntu-users-request <at> lists.ubuntu.com
>
> You can reach the person managing the list at
>         ubuntu-users-owner <at> lists.ubuntu.com
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ubuntu-users digest..."
>
>
> Today's Topics:
>
>    1. Re: Help with iPhones and Ubuntu (Dave Woyciesjes)
>    2. Re: boot issues after restoring a backup (scar)
>    3. Re: boot issues after restoring a backup (scar)
>    4. RE: boot issues after restoring a backup (Juan Blanco)
>    5. Re: boot issues after restoring a backup (Petter Adsen)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 29 Jun 2015 16:30:59 -0400
> From: Dave Woyciesjes <woyciesjes <at> sbcglobal.net>
> To: "Ubuntu user technical support, not for general discussions"
>         <ubuntu-users <at> lists.ubuntu.com>
> Subject: Re: Help with iPhones and Ubuntu
> Message-ID: <5591AB03.2030608 <at> sbcglobal.net>
> Content-Type: text/plain; charset=windows-1252; format=flowed
>
> On 06/29/2015 04:06 PM, Scott Ehrlich wrote:
>> Please advise on the right place for this question if this is the
>> wrong place for it -
>>
>> I changed from an iPhone 4 (iOS 7.1.2) backed up via iCloud, to an
>> iPhone 5S (iOS 8.1.3) with data restored from my iCloud account.
>>
>> I have learned that once an account (iTunes backup/restore or iCloud
>> backup/restore) becomes involved with a device with a newer iOS, it
>> prevents you from restoring to the older device.
>>
>> I prefer to revert from my iPhone 5 back to my iPhone 4, but due to
>> Apple's restriction, this is not possible.   The iPhone 5 has newer
>> information, just recreating the phone book on it would not suffice.
>>
>> Both phones are seen by my Ubuntu systems (Mac Mini reformatted with
>> 14.04 and a Dell Vostro 1520 also with 14.04).
>>
>> Is there any tool/method (non root/hack) that will at least let me
>> transfer the data from the 5 to the 4?
>>
>> I also have a Mac, if that helps.
>>
>> Thanks.
>>
>> Scott
>>
>
>         TO confirm, you do have a 4, and not a newer 4S (which can get up to
> iOS 8.1.3...) I assume you have your 4 updated as far as possible.
>
> What data specifically do you need to transfer back?
>
> --
> --- Dave Woyciesjes
> --- CompTIA A+ Certified IT Tech - http://certification.comptia.org/
> --- HDI Certified Support Center Analyst - http://www.ThinkHDI.com/
> Registered Linux user number 464583
>
> "Computers have lots of memory but no imagination."
> "The problem with troubleshooting is that trouble shoots back."
> - from some guy on the internet.
>

I do have an iPhone 4 (not 4S) whose firmware/iOS version cannot go
beyond 7.1.2.

I am looking to transfer the phone book, messages/texts, photos,
videos, and, memos back to my old iPhone 4.

I have discovered the iPhone 4 (with iOS 7.1.2) is dramatically better
at response time and battery than iOS 8.1.2 on an iPhone 4S (which I
also have) and an iPhone 5S (which I also have).   I have tried a
Samsung Galaxy S5, but the lock screen on it does not come close in
alerts to what Apple provides on the iPhone/iPad.

So, is there a way to transfer the data (Linux commands, third-party
app, etc) from the newer device to the old (since Apple now prevents a
restore from newer iOS to older)?   Or, do I simply need to wait for
iOS 9 and see if it supports my 4, and if it offers any improvements
over 8?  I can always adjust system settings as needed.

Thanks.

Scott

>
>
> ------------------------------
>
> Message: 2
> Date: Mon, 29 Jun 2015 18:20:49 -0700
> From: scar <scar <at> drigon.com>
> To: ubuntu-users <at> lists.ubuntu.com
> Subject: Re: boot issues after restoring a backup
> Message-ID: <mmsqti$bb4$1 <at> ger.gmane.org>
> Content-Type: text/plain; charset=utf-8
>
> so i've just done a basic/netinst of ubuntu 12.04 and that is at least
> booting up fine... so now i am going to boot to a liveCD and try to do a
> sort of bare-metal restore of my backup... basically restore all of my
> root partition except for /etc/fstab and /etc/crypttab (and /boot too
> since it is a different partition and already has the 12.04 kernels
> installed).  if there are any other files i should leave out please let
> me know--i need to get the system running ASAP
>
>
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 29 Jun 2015 20:54:34 -0700
> From: scar <scar <at> drigon.com>
> To: ubuntu-users <at> lists.ubuntu.com
> Subject: Re: boot issues after restoring a backup
> Message-ID: <mmt3tr$4vj$1 <at> ger.gmane.org>
> Content-Type: text/plain; charset=utf-8
>
> well i am happy to report that i got it!  i restored everything except a
> few select things:
> /etc/fstab
> /etc/crypttab
> /etc/lvm
> /lost+found
> /mnt
> /media
> /boot
> /initrd.img
> /vmlinuz
> (and stuff like /dev, /proc and /tmp i didn't backup)
>
> so far everything is working as it should
>
>
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 29 Jun 2015 23:03:15 -0500
> From: Juan Blanco <intuitionist <at> msn.com>
> To: "Ubuntu user technical support, not for general discussions"
>         <ubuntu-users <at> lists.ubuntu.com>
> Subject: RE: boot issues after restoring a backup
> Message-ID: <BLU177-W307FE0070CE95CB1315F46D8A90 <at> phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Congrats!!
>
>> To: ubuntu-users <at> lists.ubuntu.com
>> From: scar <at> drigon.com
>> Subject: Re: boot issues after restoring a backup
>> Date: Mon, 29 Jun 2015 20:54:34 -0700
>>
>> well i am happy to report that i got it!  i restored everything except a
>> few select things:
>> /etc/fstab
>> /etc/crypttab
>> /etc/lvm
>> /lost+found
>> /mnt
>> /media
>> /boot
>> /initrd.img
>> /vmlinuz
>> (and stuff like /dev, /proc and /tmp i didn't backup)
>>
>> so far everything is working as it should
>>
>>
>> --
>> ubuntu-users mailing list
>> ubuntu-users <at> lists.ubuntu.com
>> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150629/bff68fd9/attachment-0001.html>
>
> ------------------------------
>
> Message: 5
> Date: Tue, 30 Jun 2015 08:21:08 +0200
> From: Petter Adsen <petter <at> synth.no>
> To: ubuntu-users <at> lists.ubuntu.com
> Subject: Re: boot issues after restoring a backup
> Message-ID: <20150630082108.0c471287 <at> monster>
> Content-Type: text/plain; charset="us-ascii"
>
> On Mon, 29 Jun 2015 10:09:34 -0700
> scar <scar <at> drigon.com> wrote:
>
>> Petter Adsen wrote on 06/29/2015 05:30 AM:
>> > What's in /etc/fstab and /etc/crypttab? The output of lsblk and
>> > blkid would also be useful in figuring this out.
>>
>> i don't understand why that would matter right now, as i can't even
>> boot the kernel to the point where it asks for my passphrase and thus
>> unlock the root partition with /etc/fstab and /etc/crypttab, but here
>> is the requested info for sdb: http://pastebin.com/6Q7Yg8AZ
>>
>> i did try to update the files with the right UUIDs but i must be
>> missing something....
>>
>> i'm thinking i should just do a fresh install of 12.04 and then after
>> that is booting fine just restore my / (root) from backup... but that
>> will revert /etc/fstab and /etc/crypttab too....
>
> I see now that you got it running, but I'll guess that your problem was
> that you had not updated the initramfs after setting the right UUIDs.
>
> Petter
>
> --
> "I'm ionized"
> "Are you sure?"
> "I'm positive."
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 213 bytes
> Desc: OpenPGP digital signature
> URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20150630/ecfe3875/attachment-0001.pgp>
>
> ------------------------------
>
> --
> ubuntu-users mailing list
> ubuntu-users <at> lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>
>
> End of ubuntu-users Digest, Vol 130, Issue 60
> *********************************************

Scott Ehrlich | 29 Jun 22:06 2015

Help with iPhones and Ubuntu

Please advise on the right place for this question if this is the
wrong place for it -

I changed from an iPhone 4 (iOS 7.1.2) backed up via iCloud, to an
iPhone 5S (iOS 8.1.3) with data restored from my iCloud account.

I have learned that once an account (iTunes backup/restore or iCloud
backup/restore) becomes involved with a device with a newer iOS, it
prevents you from restoring to the older device.

I prefer to revert from my iPhone 5 back to my iPhone 4, but due to
Apple's restriction, this is not possible.   The iPhone 5 has newer
information, just recreating the phone book on it would not suffice.

Both phones are seen by my Ubuntu systems (Mac Mini reformatted with
14.04 and a Dell Vostro 1520 also with 14.04).

Is there any tool/method (non root/hack) that will at least let me
transfer the data from the 5 to the 4?

I also have a Mac, if that helps.

Thanks.

Scott

scar | 29 Jun 12:27 2015

boot issues after restoring a backup

i was trying to follow this guide[1] to resize my partitions, and it
hosed up my system.  fortunately i had a backup, but i can't seem to
make the system boot now after restoring.  since the guide hosed up my
partitions, i deleted them and re-created them to the sizes i wanted,
then restored my backup data and ran grub-install from a liveCD.  but
now when i try and boot, the grub2 menu loads and shows the kernel list,
and after i select the kernel i am seeing an error like "no such device"
and its printing a UUID out and the rebooting quickly before i can read
anything else.  i figured the backups i restored are referencing some
UUID that doesn't exist anymore because i repartitioned the drive.  as
you can see from the guide, i am using encrypted LVM partitions.  here
is the output of fdisk:

Disk /dev/sdb: 300.1 GB, 300069052416 bytes
255 heads, 63 sectors/track, 36481 cylinders, total 586072368 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007b5d5

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      585727      291840   83  Linux
/dev/sdb2          587774   195897343    97654785    5  Extended
/dev/sdb5          587776   195897343    97654784   83  Linux

sdb1 is where /boot is and then sdb5 is the encrypted area with LVM
partitions for root and swap.  i've tried so many different things and
i'm tired now, looking for advice and a new perspective....

1.
https://help.ubuntu.com/community/ResizeEncryptedPartitions#Detailed_resizing_.2BAH4_Reducing_an_encrypted_partition

C.Tresenriter | 28 Jun 20:46 2015
Picon

Duplicate email test - NT


C.Tresenriter | 28 Jun 16:33 2015
Picon

Display problem inn Ubuntu Software center

I normally use synaptic but I found it would not install Ardour
(dependency issues) while the software center does. (?)

The problem is that looking at the gui all I see are icons and their
star ratings.
There is no text until I click on an icon and then it's very hard to
read and only then does the "More Info" and "Install" buttons appear but
still no description.

Is there some system display setting somewhere that needs an
adjustment?.. a different theme maybe?
I' not sure where to start.

agents4jesus | 28 Jun 05:38 2015
Picon

Parental Controls

Hi All,

A while ago, I tried fiddling with Parental Controls for Ubuntu. As there are no native/preinstalled programs for that task, I looked online. DansGuardian came up in my search (you may be familiar with it), so I installed it and had it working, and it did it’s job fairly well.

Until we found out that it didn’t block https.

The reason is simple: https is secure and encrypted. Thus, once the computer has made a https request and is connected to the https server, the rest of the computer (so to speak) can’t mess with it, including DansGuardian. This is the way Ubuntu is set up, I think. Correct me if I’m wrong.

I find this hard to believe. Windows and Mac have web filtering programs that are able to block any website, and Android (with Linux and it’s core) can use NetNanny that can block https as well.

Is there a way to fix this? A terminal command, or another piece of software entirely?

And for Parental Controls in general, do any of you have any suggestions?

Thanks a ton, everyone,

Tony
<div>
<div data-externalstyle="false" dir="ltr">
<div>Hi All,</div>
<div><br></div>
<div>A while ago, I tried fiddling with Parental Controls for Ubuntu. As there are no native/preinstalled programs for that task, I looked&nbsp;online.&nbsp;DansGuardian came up in my search (you may be familiar with it),&nbsp;so I installed it and had it working, and it did it&rsquo;s job&nbsp;fairly well.</div>
<div><br></div>
<div>Until we found out that it didn&rsquo;t block https. </div>
<div><br></div>
<div>The reason is simple: https is secure and&nbsp;encrypted. Thus, once&nbsp;the computer has made a https request and is connected to the https server, the rest of the computer (so to speak) can&rsquo;t mess with it, including DansGuardian. This is the way Ubuntu is set up, I think. Correct me if I&rsquo;m wrong.</div>
<div><br></div>
<div>I find this hard to believe.&nbsp;Windows and Mac have web filtering programs that are able to block any website, and Android (with Linux and it&rsquo;s core) can use NetNanny that can block https as well. </div>
<div><br></div>
<div data-signatureblock="true">Is there a way to fix this?&nbsp;A terminal command, or another piece of software entirely?</div>
<div data-signatureblock="true"><br></div>
<div data-signatureblock="true">And for Parental Controls in general, do any of you have any suggestions?</div>
<div data-signatureblock="true"><br></div>
<div data-signatureblock="true">Thanks a ton, everyone,</div>
<div data-signatureblock="true"><br></div>
<div data-signatureblock="true">Tony<br>
</div>

</div>
</div>
Jay Ridgley | 27 Jun 13:11 2015
Picon

Ubuntu equivalent of SKYPE

Hi Y'all,

Is there an equivalent for Ubuntu(Linux) Skype? I do not want to use M$ 
software of any variety, however, I do need to be able to do video 
conferencing. I believe that iPad users have an app called Facetime... I 
would assume that a version of that for Linux would work as well, if it 
exists, I do not have a smart phone either...

Is there a video conferencing application available to us that can 
interface with Facetime?

I am currently running Ubuntu 14.04.2 LTS

Thanks,
Jay
--

-- 
Jay Ridgley
jridgley2 at austin.rr.com
Registered Linux User ID - 9115
https://linuxcounter.net/cert/9115.png
Registered Ubuntu User ID - 23320

Noah | 27 Jun 08:54 2015

Why do I have to manually copy /etc/services and /etc/resolv.conf into /var/spool/postfix/etc


Hi there,

I am trying to figure out why I have to manually copy /etc/services and 
/etc/resolv.conf into /var/spool/postfix/etc ?

I see the following lines from my /etc/init.d/postfix which should run 
when I start postfix.

---- snip ---

	FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \
	    etc/nsswitch.conf etc/nss_mdns.config"
	for file in $FILES; do
	    [ -d ${file%/*} ] || mkdir -p ${file%/*}
	    if [ -f /${file} ]; then rm -f ${file} && cp /${file} ${file}; fi
	    if [ -f  ${file} ]; then chmod a+rX ${file}; fi
	done

here is my entire /etc/init.d/postfix

$ cat /etc/init.d/postfix
#!/bin/sh -e

# Start or stop Postfix
#
# LaMont Jones <lamont <at> debian.org>
# based on sendmail's init.d script

### BEGIN INIT INFO
# Provides:          postfix mail-transport-agent
# Required-Start:    $local_fs $remote_fs $syslog $named $network $time
# Required-Stop:     $local_fs $remote_fs $syslog $named $network
# Should-Start:      postgresql mysql clamav-daemon postgrey 
spamassassin saslauthd dovecot
# Should-Stop:       postgresql mysql clamav-daemon postgrey 
spamassassin saslauthd dovecot
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: start and stop the Postfix Mail Transport Agent
# Description:       postfix is a Mail Transport agent
### END INIT INFO

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/postfix
NAME=Postfix
TZ=
unset TZ

# Defaults - don't touch, edit /etc/default/postfix
SYNC_CHROOT="y"

test -f /etc/default/postfix && . /etc/default/postfix

test -x $DAEMON && test -f /etc/postfix/main.cf || exit 0

. /lib/lsb/init-functions
#DISTRO=$(lsb_release -is 2>/dev/null || echo Debian)

enabled_instances() {
	postmulti -l -a | awk '($3=="y") { print $1}'
}

running() {
     INSTANCE="$1"
     if [ "X$INSTANCE" = X ]; then
	    POSTCONF="postconf"
     else
	    POSTCONF="postmulti -i $INSTANCE -x postconf"
     fi

     queue=$($POSTCONF -h queue_directory 2>/dev/null || echo 
/var/spool/postfix)
     if [ -f ${queue}/pid/master.pid ]; then
	pid=$(sed 's/ //g' ${queue}/pid/master.pid)
	# what directory does the executable live in.  stupid prelink systems.
	dir=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* -> //; s/\/[^\/]*$//')
	if [ "X$dir" = "X/usr/lib/postfix" ]; then
	    echo y
	fi
     fi
}

configure_instance() {
     INSTANCE="$1"
     if [ "X$INSTANCE" = X ]; then
	    POSTCONF="postconf"
     else
	    POSTCONF="postmulti -i $INSTANCE -x postconf"
     fi

     # if you set myorigin to 'ubuntu.com' or 'debian.org', it's wrong, 
and annoys the admins of
     # those domains.  See also sender_canonical_maps.

     MYORIGIN=$($POSTCONF -h myorigin | tr 'A-Z' 'a-z')
     if [ "X${MYORIGIN#/}" != "X${MYORIGIN}" ]; then
	MYORIGIN=$(tr 'A-Z' 'a-z' < $MYORIGIN)
     fi
     if [ "X$MYORIGIN" = Xubuntu.com ] || [ "X$MYORIGIN" = Xdebian.org 
]; then
	log_failure_msg "Invalid \$myorigin ($MYORIGIN), refusing to start"
	log_end_msg 1
	exit 1
     fi

     config_dir=$($POSTCONF -h config_directory)
     # see if anything is running chrooted.
     NEED_CHROOT=$(awk '/^[0-9a-z]/ && ($5 ~ "[-yY]") { print "y"; 
exit}' ${config_dir}/master.cf)

     if [ -n "$NEED_CHROOT" ] && [ -n "$SYNC_CHROOT" ]; then
	# Make sure that the chroot environment is set up correctly.
	oldumask=$(umask)
	umask 022
	queue_dir=$($POSTCONF -h queue_directory)
	cd "$queue_dir"

	# copy the CA path if specified
	ca_path=$($POSTCONF -h smtp_tls_CApath)
	case "$ca_path" in
	    '') :;; # no ca_path
	    $queue_dir/*) :;;  # skip stuff already in chroot, (and to make vim 
syntax happy: */)
	    *)
		if test -d "$ca_path"; then
		    dest_dir="$queue_dir/${ca_path#/}"
		    # strip any/all trailing /
		    while [ "${dest_dir%/}" != "${dest_dir}" ]; do
			dest_dir="${dest_dir%/}"
		    done
		    new=0
		    if test -d "$dest_dir"; then
			# write to a new directory ...
			dest_dir="${dest_dir}.NEW"
			new=1
		    fi
		    mkdir --parent ${dest_dir}
		    # handle files in subdirectories
		    (cd "$ca_path" && find . -name '*.pem' -print0 | cpio -0pdL 
--quiet "$dest_dir") 2>/dev/null ||
		        (log_failure_msg failure copying certificates; exit 1)
		    c_rehash "$dest_dir" >/dev/null 2>&1
		    if [ "$new" = 1 ]; then
			# and replace the old directory
			rm -rf "${dest_dir%.NEW}"
			mv "$dest_dir" "${dest_dir%.NEW}"
		    fi
		fi
		;;
	esac

	# if there is a CA file, copy it
	ca_file=$($POSTCONF -h smtp_tls_CAfile)
	case "$ca_file" in
	    $queue_dir/*) :;;  # skip stuff already in chroot
	    '') # no ca_file
		# or copy the bundle to preserve functionality
		ca_bundle=/etc/ssl/certs/ca-certificates.crt
		if [ -f $ca_bundle ]; then
		    mkdir --parent "$queue_dir/${ca_bundle%/*}"
		    cp -L "$ca_bundle" "$queue_dir/${ca_bundle%/*}"
		fi
		;;
	    *)
		if test -f "$ca_file"; then
		    dest_dir="$queue_dir/${ca_path#/}"
		    mkdir --parent "$dest_dir"
		    cp -L "$ca_file" "$dest_dir"
		fi
		;;
	esac

	# if we're using unix:passwd.byname, then we need to add etc/passwd.
	local_maps=$($POSTCONF -h local_recipient_maps)
	if [ "X$local_maps" != "X${local_maps#*unix:passwd.byname}" ]; then
	    if [ "X$local_maps" = "X${local_maps#*proxy:unix:passwd.byname}" ]; 
then
		sed 's/^\([^:]*\):[^:]*/\1:x/' /etc/passwd > etc/passwd
		chmod a+r etc/passwd
	    fi
	fi

	FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \
	    etc/nsswitch.conf etc/nss_mdns.config"
	for file in $FILES; do
	    [ -d ${file%/*} ] || mkdir -p ${file%/*}
	    if [ -f /${file} ]; then rm -f ${file} && cp /${file} ${file}; fi
	    if [ -f  ${file} ]; then chmod a+rX ${file}; fi
	done
	# ldaps needs this. debian bug 572841
	(echo /dev/random; echo /dev/urandom) | cpio -pdL --quiet . 2>/dev/null 
|| true
	rm -f usr/lib/zoneinfo/localtime
	mkdir -p usr/lib/zoneinfo
	ln -sf /etc/localtime usr/lib/zoneinfo/localtime

	LIBLIST=$(for name in gcc_s nss resolv; do
	    for f in /lib/*/lib${name}*.so* /lib/lib${name}*.so*; do
	       if [ -f "$f" ]; then  echo ${f#/}; fi;
	    done;
	done)

	if [ -n "$LIBLIST" ]; then
	    for f in "$LIBLIST"; do
		rm -f "$f"
	    done
	    tar cf - -C / $LIBLIST 2>/dev/null |tar xf -
	fi
	umask $oldumask
     fi
}

case "$1" in
     start)
	log_daemon_msg "Starting Postfix Mail Transport Agent" postfix
	RET=0
	# for all instances that are not already running, handle chroot setup 
if needed, and start
	for INSTANCE in $(enabled_instances); do
	    RUNNING=$(running $INSTANCE)
	    if [ "X$RUNNING" = X ]; then
		configure_instance $INSTANCE
		CMD="/usr/sbin/postmulti -- -i $INSTANCE -x ${DAEMON}"
		if ! start-stop-daemon --start --exec $CMD quiet-quick-start; then
		    RET=1
		fi
	    fi
	done
	log_end_msg $RET
     ;;

     stop)
	log_daemon_msg "Stopping Postfix Mail Transport Agent" postfix
	RET=0
	# for all instances that are not already running, handle chroot setup 
if needed, and start
	for INSTANCE in $(enabled_instances); do
	    RUNNING=$(running $INSTANCE)
	    if [ "X$RUNNING" != X ]; then
		CMD="/usr/sbin/postmulti -i $INSTANCE -x ${DAEMON}"
		if ! ${CMD} quiet-stop; then
		    RET=1
		fi
	    fi
	done
	log_end_msg $RET
     ;;

     restart)
         $0 stop
         $0 start
     ;;

     force-reload|reload)
	log_action_begin_msg "Reloading Postfix configuration"
	if ${DAEMON} quiet-reload; then
	    log_action_end_msg 0
	else
	    log_action_end_msg 1
	fi
     ;;

     status)
	ALL=1
	ANY=0
	# for all instances that are not already running, handle chroot setup 
if needed, and start
	for INSTANCE in $(enabled_instances); do
	    RUNNING=$(running $INSTANCE)
	    if [ "X$RUNNING" != X ]; then
	    	ANY=1
	    else
	    	ALL=0
	    fi
	done
	# handle the case when postmulti returns *no* configured instances
	if [ $ANY = 0 ]; then
	   ALL=0
	fi
	if [ $ALL = 1 ]; then
	   log_success_msg "postfix is running"
	   exit 0
	elif [ $ANY = 1 ]; then
	   log_success_msg "some postfix instances are running"
	   exit 0
	else
	   log_success_msg "postfix is not running"
	   exit 3
	fi
     ;;

     flush|check|abort)
	${DAEMON} $1
     ;;

     *)
	log_action_msg "Usage: /etc/init.d/postfix 
{start|stop|restart|reload|flush|check|abort|force-reload|status}"
	exit 1
     ;;
esac

exit 0

Noah | 27 Jun 06:27 2015

/etc/init.d/postfix not stopping postfix

okay I cant figure this out but /etc/init.d/postfix stop is not stopping 
postfix. Any ideas why?

$ cat /etc/init.d/postfix
#!/bin/sh -e

# Start or stop Postfix
#
# LaMont Jones <lamont <at> debian.org>
# based on sendmail's init.d script

### BEGIN INIT INFO
# Provides: postfix mail-transport-agent
# Required-Start: $local_fs $remote_fs $syslog $named $network $time
# Required-Stop: $local_fs $remote_fs $syslog $named $network
# Should-Start: postgresql mysql clamav-daemon postgrey spamassassin 
saslauthd dovecot
# Should-Stop: postgresql mysql clamav-daemon postgrey spamassassin 
saslauthd dovecot
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: start and stop the Postfix Mail Transport Agent
# Description: postfix is a Mail Transport agent
### END INIT INFO

PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=/usr/sbin/postfix
NAME=Postfix
TZ=
unset TZ

# Defaults - don't touch, edit /etc/default/postfix
SYNC_CHROOT="y"

test -f /etc/default/postfix && . /etc/default/postfix

test -x $DAEMON && test -f /etc/postfix/main.cf || exit 0

. /lib/lsb/init-functions
#DISTRO=$(lsb_release -is 2>/dev/null || echo Debian)

enabled_instances() {
postmulti -l -a | awk '($3=="y") { print $1}'
}

running() {
INSTANCE="$1"
if [ "X$INSTANCE" = X ]; then
POSTCONF="postconf"
else
POSTCONF="postmulti -i $INSTANCE -x postconf"
fi

queue=$($POSTCONF -h queue_directory 2>/dev/null || echo /var/spool/postfix)
if [ -f ${queue}/pid/master.pid ]; then
pid=$(sed 's/ //g' ${queue}/pid/master.pid)
# what directory does the executable live in. stupid prelink systems.
dir=$(ls -l /proc/$pid/exe 2>/dev/null | sed 's/.* -> //; s/\/[^\/]*$//')
if [ "X$dir" = "X/usr/lib/postfix" ]; then
echo y
fi
fi
}

configure_instance() {
INSTANCE="$1"
if [ "X$INSTANCE" = X ]; then
POSTCONF="postconf"
else
POSTCONF="postmulti -i $INSTANCE -x postconf"
fi

# if you set myorigin to 'ubuntu.com' or 'debian.org', it's wrong, and 
annoys the admins of
# those domains. See also sender_canonical_maps.

MYORIGIN=$($POSTCONF -h myorigin | tr 'A-Z' 'a-z')
if [ "X${MYORIGIN#/}" != "X${MYORIGIN}" ]; then
MYORIGIN=$(tr 'A-Z' 'a-z' < $MYORIGIN)
fi
if [ "X$MYORIGIN" = Xubuntu.com ] || [ "X$MYORIGIN" = Xdebian.org ]; then
log_failure_msg "Invalid \$myorigin ($MYORIGIN), refusing to start"
log_end_msg 1
exit 1
fi

config_dir=$($POSTCONF -h config_directory)
# see if anything is running chrooted.
NEED_CHROOT=$(awk '/^[0-9a-z]/ && ($5 ~ "[-yY]") { print "y"; exit}' 
${config_dir}/master.cf)

if [ -n "$NEED_CHROOT" ] && [ -n "$SYNC_CHROOT" ]; then
# Make sure that the chroot environment is set up correctly.
oldumask=$(umask)
umask 022
queue_dir=$($POSTCONF -h queue_directory)
cd "$queue_dir"

# copy the CA path if specified
ca_path=$($POSTCONF -h smtp_tls_CApath)
case "$ca_path" in
'') :;; # no ca_path
$queue_dir/*) :;; # skip stuff already in chroot, (and to make vim 
syntax happy: */)
*)
if test -d "$ca_path"; then
dest_dir="$queue_dir/${ca_path#/}"
# strip any/all trailing /
while [ "${dest_dir%/}" != "${dest_dir}" ]; do
dest_dir="${dest_dir%/}"
done
new=0
if test -d "$dest_dir"; then
# write to a new directory ...
dest_dir="${dest_dir}.NEW"
new=1
fi
mkdir --parent ${dest_dir}
# handle files in subdirectories
(cd "$ca_path" && find . -name '*.pem' -print0 | cpio -0pdL --quiet 
"$dest_dir") 2>/dev/null ||
(log_failure_msg failure copying certificates; exit 1)
c_rehash "$dest_dir" >/dev/null 2>&1
if [ "$new" = 1 ]; then
# and replace the old directory
rm -rf "${dest_dir%.NEW}"
mv "$dest_dir" "${dest_dir%.NEW}"
fi
fi
;;
esac

# if there is a CA file, copy it
ca_file=$($POSTCONF -h smtp_tls_CAfile)
case "$ca_file" in
$queue_dir/*) :;; # skip stuff already in chroot
'') # no ca_file
# or copy the bundle to preserve functionality
ca_bundle=/etc/ssl/certs/ca-certificates.crt
if [ -f $ca_bundle ]; then
mkdir --parent "$queue_dir/${ca_bundle%/*}"
cp -L "$ca_bundle" "$queue_dir/${ca_bundle%/*}"
fi
;;
*)
if test -f "$ca_file"; then
dest_dir="$queue_dir/${ca_path#/}"
mkdir --parent "$dest_dir"
cp -L "$ca_file" "$dest_dir"
fi
;;
esac

# if we're using unix:passwd.byname, then we need to add etc/passwd.
local_maps=$($POSTCONF -h local_recipient_maps)
if [ "X$local_maps" != "X${local_maps#*unix:passwd.byname}" ]; then
if [ "X$local_maps" = "X${local_maps#*proxy:unix:passwd.byname}" ]; then
sed 's/^\([^:]*\):[^:]*/\1:x/' /etc/passwd > etc/passwd
chmod a+r etc/passwd
fi
fi

FILES="etc/localtime etc/services etc/resolv.conf etc/hosts \
etc/nsswitch.conf etc/nss_mdns.config"
for file in $FILES; do
[ -d ${file%/*} ] || mkdir -p ${file%/*}
if [ -f /${file} ]; then rm -f ${file} && cp /${file} ${file}; fi
if [ -f ${file} ]; then chmod a+rX ${file}; fi
done
# ldaps needs this. debian bug 572841
(echo /dev/random; echo /dev/urandom) | cpio -pdL --quiet . 2>/dev/null 
|| true
rm -f usr/lib/zoneinfo/localtime
mkdir -p usr/lib/zoneinfo
ln -sf /etc/localtime usr/lib/zoneinfo/localtime

LIBLIST=$(for name in gcc_s nss resolv; do
for f in /lib/*/lib${name}*.so* /lib/lib${name}*.so*; do
if [ -f "$f" ]; then echo ${f#/}; fi;
done;
done)

if [ -n "$LIBLIST" ]; then
for f in "$LIBLIST"; do
rm -f "$f"
done
tar cf - -C / $LIBLIST 2>/dev/null |tar xf -
fi
umask $oldumask
fi
}

case "$1" in
start)
log_daemon_msg "Starting Postfix Mail Transport Agent" postfix
RET=0
# for all instances that are not already running, handle chroot setup if 
needed, and start
for INSTANCE in $(enabled_instances); do
RUNNING=$(running $INSTANCE)
if [ "X$RUNNING" = X ]; then
configure_instance $INSTANCE
CMD="/usr/sbin/postmulti -- -i $INSTANCE -x ${DAEMON}"
if ! start-stop-daemon --start --exec $CMD quiet-quick-start; then
RET=1
fi
fi
done
log_end_msg $RET
;;

stop)
log_daemon_msg "Stopping Postfix Mail Transport Agent" postfix
RET=0
# for all instances that are not already running, handle chroot setup if 
needed, and start
for INSTANCE in $(enabled_instances); do
RUNNING=$(running $INSTANCE)
if [ "X$RUNNING" != X ]; then
CMD="/usr/sbin/postmulti -i $INSTANCE -x ${DAEMON}"
if ! ${CMD} quiet-stop; then
RET=1
fi
fi
done
log_end_msg $RET
;;

restart)
$0 stop
$0 start
;;

force-reload|reload)
log_action_begin_msg "Reloading Postfix configuration"
if ${DAEMON} quiet-reload; then
log_action_end_msg 0
else
log_action_end_msg 1
fi
;;

status)
ALL=1
ANY=0
# for all instances that are not already running, handle chroot setup if 
needed, and start
for INSTANCE in $(enabled_instances); do
RUNNING=$(running $INSTANCE)
if [ "X$RUNNING" != X ]; then
ANY=1
else
ALL=0
fi
done
# handle the case when postmulti returns *no* configured instances
if [ $ANY = 0 ]; then
ALL=0
fi
if [ $ALL = 1 ]; then
log_success_msg "postfix is running"
exit 0
elif [ $ANY = 1 ]; then
log_success_msg "some postfix instances are running"
exit 0
else
log_success_msg "postfix is not running"
exit 3
fi
;;

flush|check|abort)
${DAEMON} $1
;;

*)
log_action_msg "Usage: /etc/init.d/postfix 
{start|stop|restart|reload|flush|check|abort|force-reload|status}"
exit 1
;;
esac

exit 0


Gmane